浏览代码

Fixed Various Warnings and Hints in FreePascal. (#2)

* fixed some warnings and hints issued by FreePascal.

* fixed some comments.
Ugochukwu Mmaduekwe 7 年之前
父节点
当前提交
dc12715a16
共有 77 个文件被更改,包括 30 次插入654 次删除
  1. 2 0
      CryptoLib/src/Asn1/Sec/ClpSecNamedCurves.pas
  2. 2 2
      CryptoLib/src/Asn1/X9/ClpECNamedCurveTable.pas
  3. 0 1
      CryptoLib/src/Asn1/X9/ClpX9ECParameters.pas
  4. 0 2
      CryptoLib/src/Interfaces/ClpIAbstractECMultiplier.pas
  5. 0 3
      CryptoLib/src/Interfaces/ClpIAsn1OctetString.pas
  6. 0 5
      CryptoLib/src/Interfaces/ClpIAsn1Sequence.pas
  7. 0 3
      CryptoLib/src/Interfaces/ClpIAsn1Set.pas
  8. 0 4
      CryptoLib/src/Interfaces/ClpIAsn1TaggedObject.pas
  9. 0 3
      CryptoLib/src/Interfaces/ClpIBerApplicationSpecificParser.pas
  10. 0 3
      CryptoLib/src/Interfaces/ClpIBerBitString.pas
  11. 0 2
      CryptoLib/src/Interfaces/ClpIBerNull.pas
  12. 0 6
      CryptoLib/src/Interfaces/ClpIBerOctetString.pas
  13. 1 5
      CryptoLib/src/Interfaces/ClpIBerOctetStringParser.pas
  14. 0 3
      CryptoLib/src/Interfaces/ClpIBerSequence.pas
  15. 0 4
      CryptoLib/src/Interfaces/ClpIBerSequenceParser.pas
  16. 0 3
      CryptoLib/src/Interfaces/ClpIBerSet.pas
  17. 0 4
      CryptoLib/src/Interfaces/ClpIBerSetParser.pas
  18. 0 2
      CryptoLib/src/Interfaces/ClpIBerTaggedObject.pas
  19. 0 7
      CryptoLib/src/Interfaces/ClpIBerTaggedObjectParser.pas
  20. 0 2
      CryptoLib/src/Interfaces/ClpIConstructedOctetStream.pas
  21. 0 6
      CryptoLib/src/Interfaces/ClpIDefiniteLengthInputStream.pas
  22. 0 5
      CryptoLib/src/Interfaces/ClpIDerApplicationSpecific.pas
  23. 0 8
      CryptoLib/src/Interfaces/ClpIDerBitString.pas
  24. 0 7
      CryptoLib/src/Interfaces/ClpIDerBmpString.pas
  25. 0 5
      CryptoLib/src/Interfaces/ClpIDerBoolean.pas
  26. 0 5
      CryptoLib/src/Interfaces/ClpIDerEnumerated.pas
  27. 10 15
      CryptoLib/src/Interfaces/ClpIDerExternal.pas
  28. 0 1
      CryptoLib/src/Interfaces/ClpIDerExternalParser.pas
  29. 0 7
      CryptoLib/src/Interfaces/ClpIDerGeneralString.pas
  30. 0 8
      CryptoLib/src/Interfaces/ClpIDerGraphicString.pas
  31. 0 8
      CryptoLib/src/Interfaces/ClpIDerIA5String.pas
  32. 0 4
      CryptoLib/src/Interfaces/ClpIDerInteger.pas
  33. 0 5
      CryptoLib/src/Interfaces/ClpIDerNull.pas
  34. 0 7
      CryptoLib/src/Interfaces/ClpIDerNumericString.pas
  35. 0 4
      CryptoLib/src/Interfaces/ClpIDerObjectIdentifier.pas
  36. 0 4
      CryptoLib/src/Interfaces/ClpIDerOctetString.pas
  37. 1 5
      CryptoLib/src/Interfaces/ClpIDerOctetStringParser.pas
  38. 0 7
      CryptoLib/src/Interfaces/ClpIDerPrintableString.pas
  39. 0 3
      CryptoLib/src/Interfaces/ClpIDerSequence.pas
  40. 0 4
      CryptoLib/src/Interfaces/ClpIDerSequenceParser.pas
  41. 0 3
      CryptoLib/src/Interfaces/ClpIDerSet.pas
  42. 0 4
      CryptoLib/src/Interfaces/ClpIDerSetParser.pas
  43. 0 1
      CryptoLib/src/Interfaces/ClpIDerStringBase.pas
  44. 0 7
      CryptoLib/src/Interfaces/ClpIDerT61String.pas
  45. 0 2
      CryptoLib/src/Interfaces/ClpIDerTaggedObject.pas
  46. 0 7
      CryptoLib/src/Interfaces/ClpIDerUniversalString.pas
  47. 0 7
      CryptoLib/src/Interfaces/ClpIDerUtf8String.pas
  48. 0 8
      CryptoLib/src/Interfaces/ClpIDerVideotexString.pas
  49. 0 8
      CryptoLib/src/Interfaces/ClpIDerVisibleString.pas
  50. 0 7
      CryptoLib/src/Interfaces/ClpIDigestRandomGenerator.pas
  51. 0 32
      CryptoLib/src/Interfaces/ClpIDsaDigestSigner.pas
  52. 1 26
      CryptoLib/src/Interfaces/ClpIECDsaSigner.pas
  53. 0 94
      CryptoLib/src/Interfaces/ClpIECFieldElement.pas
  54. 0 110
      CryptoLib/src/Interfaces/ClpIECInterface.pas
  55. 0 3
      CryptoLib/src/Interfaces/ClpIECKeyParameters.pas
  56. 0 4
      CryptoLib/src/Interfaces/ClpIECPrivateKeyParameters.pas
  57. 0 4
      CryptoLib/src/Interfaces/ClpIECPublicKeyParameters.pas
  58. 1 1
      CryptoLib/src/Interfaces/ClpIFilterStream.pas
  59. 1 5
      CryptoLib/src/Interfaces/ClpIFixedPointCombMultiplier.pas
  60. 0 4
      CryptoLib/src/Interfaces/ClpIGF2Polynomial.pas
  61. 0 13
      CryptoLib/src/Interfaces/ClpIGenericPolynomialExtensionField.pas
  62. 0 3
      CryptoLib/src/Interfaces/ClpIGlvMultiplier.pas
  63. 0 11
      CryptoLib/src/Interfaces/ClpIGlvTypeBEndomorphism.pas
  64. 0 4
      CryptoLib/src/Interfaces/ClpIIndefiniteLengthInputStream.pas
  65. 0 5
      CryptoLib/src/Interfaces/ClpIPrimeField.pas
  66. 0 2
      CryptoLib/src/Interfaces/ClpIProxiedInterface.pas
  67. 0 9
      CryptoLib/src/Interfaces/ClpIRandomDsaKCalculator.pas
  68. 0 1
      CryptoLib/src/Interfaces/ClpIScaleXPointMap.pas
  69. 0 11
      CryptoLib/src/Interfaces/ClpIWNafL2RMultiplier.pas
  70. 0 11
      CryptoLib/src/Interfaces/ClpIWTauNafMultiplier.pas
  71. 0 15
      CryptoLib/src/Interfaces/ClpIX9Curve.pas
  72. 0 19
      CryptoLib/src/Interfaces/ClpIX9FieldElement.pas
  73. 0 15
      CryptoLib/src/Interfaces/ClpIX9FieldID.pas
  74. 2 2
      CryptoLib/src/Math/ClpNumberStyles.pas
  75. 0 3
      CryptoLib/src/Security/ClpRandom.pas
  76. 7 9
      CryptoLib/src/Utils/IO/ClpFilterStream.pas
  77. 2 2
      CryptoLib/src/Utils/IO/ClpStreams.pas

+ 2 - 0
CryptoLib/src/Asn1/Sec/ClpSecNamedCurves.pas

@@ -289,6 +289,7 @@ begin
     ('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F');
   a := TBigInteger.Zero;
   b := TBigInteger.ValueOf(7);
+  S := Nil;
   n := FromHex
     ('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141');
   h := TBigInteger.One;
@@ -368,6 +369,7 @@ var
 begin
   a := TBigInteger.Zero;
   b := TBigInteger.One;
+  S := Nil;
   n := FromHex
     ('01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE9AE2ED07577265DFF7F94451E061E163C61');
   h := TBigInteger.ValueOf(4);

+ 2 - 2
CryptoLib/src/Asn1/X9/ClpECNamedCurveTable.pas

@@ -26,9 +26,9 @@ uses
   ClpCryptoLibTypes,
   // ClpX962NamedCurves,
   // ClpECGost3410NamedCurves,
-  ClpX9ECParameters,
+ // ClpX9ECParameters,
   ClpSecNamedCurves,
-  ClpIECDomainParameters,
+ // ClpIECDomainParameters,
   ClpIDerObjectIdentifier,
   ClpIX9ECParameters;
 

+ 0 - 1
CryptoLib/src/Asn1/X9/ClpX9ECParameters.pas

@@ -37,7 +37,6 @@ uses
   ClpIAsn1Sequence,
   ClpIDerInteger,
   ClpX9ECPoint,
-  ClpIAsn1OctetString,
   ClpECAlgorithms,
   ClpX9Curve,
   ClpIX9Curve,

+ 0 - 2
CryptoLib/src/Interfaces/ClpIAbstractECMultiplier.pas

@@ -33,8 +33,6 @@ type
     function MultiplyPositive(const p: IECPoint; const k: TBigInteger)
       : IECPoint;
 
-    function Multiply(const p: IECPoint; const k: TBigInteger): IECPoint;
-
   end;
 
 implementation

+ 0 - 3
CryptoLib/src/Interfaces/ClpIAsn1OctetString.pas

@@ -34,9 +34,6 @@ type
     function GetStr: TCryptoLibByteArray;
     function GetParser: IAsn1OctetStringParser;
 
-    function Asn1GetHashCode(): Int32;
-    function Asn1Equals(const asn1Object: IAsn1Object): Boolean;
-
     property Str: TCryptoLibByteArray read GetStr;
     property Parser: IAsn1OctetStringParser read GetParser;
 

+ 0 - 5
CryptoLib/src/Interfaces/ClpIAsn1Sequence.pas

@@ -36,8 +36,6 @@ type
     function GetSelf(Index: Integer): IAsn1Encodable;
     function GetCurrent(e: TEnumerator<IAsn1Encodable>): IAsn1Encodable;
 
-    function Asn1GetHashCode(): Int32;
-    function Asn1Equals(const asn1Object: IAsn1Object): Boolean;
     procedure AddObject(const obj: IAsn1Encodable);
 
     function ToString(): String;
@@ -56,9 +54,6 @@ type
 
     ['{B986EDD8-A7F3-4E9C-9D5B-2FF9120D9A91}']
 
-    function ReadObject(): IAsn1Convertible;
-    function ToAsn1Object(): IAsn1Object;
-
   end;
 
 implementation

+ 0 - 3
CryptoLib/src/Interfaces/ClpIAsn1Set.pas

@@ -54,9 +54,6 @@ type
 
     ['{23EAFC37-244E-42D7-89A8-1740B12656C1}']
 
-    function ReadObject(): IAsn1Convertible;
-    function ToAsn1Object(): IAsn1Object;
-
   end;
 
 implementation

+ 0 - 4
CryptoLib/src/Interfaces/ClpIAsn1TaggedObject.pas

@@ -32,10 +32,6 @@ type
     function Getexplicitly: Boolean;
     function Getobj: IAsn1Encodable;
 
-    function Asn1Equals(const asn1Object: IAsn1Object): Boolean;
-
-    function Asn1GetHashCode(): Int32;
-
     property tagNo: Int32 read GetTagNo;
     property explicitly: Boolean read Getexplicitly;
     property obj: IAsn1Encodable read Getobj;

+ 0 - 3
CryptoLib/src/Interfaces/ClpIBerApplicationSpecificParser.pas

@@ -22,7 +22,6 @@ unit ClpIBerApplicationSpecificParser;
 interface
 
 uses
-  ClpIProxiedInterface,
   ClpIAsn1ApplicationSpecificParser;
 
 type
@@ -30,8 +29,6 @@ type
 
     ['{60363C2D-CE20-467C-BC1D-38DFCFDFDFFA}']
 
-    function ReadObject(): IAsn1Convertible;
-    function ToAsn1Object(): IAsn1Object;
   end;
 
 implementation

+ 0 - 3
CryptoLib/src/Interfaces/ClpIBerBitString.pas

@@ -22,7 +22,6 @@ unit ClpIBerBitString;
 interface
 
 uses
-  ClpIProxiedInterface,
   ClpIDerBitString;
 
 type
@@ -30,8 +29,6 @@ type
 
     ['{6AB7DC7E-CD61-4D34-AE15-99E036688C77}']
 
-    procedure Encode(const derOut: IDerOutputStream);
-
   end;
 
 implementation

+ 0 - 2
CryptoLib/src/Interfaces/ClpIBerNull.pas

@@ -22,14 +22,12 @@ unit ClpIBerNull;
 interface
 
 uses
-  ClpIProxiedInterface,
   ClpIDerNull;
 
 type
   IBerNull = interface(IDerNull)
     ['{16AF74E8-26E1-466D-BE93-38A06853DA98}']
 
-    procedure Encode(const derOut: IDerOutputStream);
   end;
 
 implementation

+ 0 - 6
CryptoLib/src/Interfaces/ClpIBerOctetString.pas

@@ -23,8 +23,6 @@ interface
 
 uses
   Generics.Collections,
-  ClpCryptoLibTypes,
-  ClpIProxiedInterface,
   ClpIDerOctetString;
 
 type
@@ -34,16 +32,12 @@ type
 
     function GenerateOcts(): TList<IDerOctetString>;
 
-    function GetOctets(): TCryptoLibByteArray;
-
     /// <summary>
     /// return the DER octets that make up this string.
     /// </summary>
 
     function GetEnumerator: TEnumerator<IDerOctetString>;
 
-    procedure Encode(const derOut: IDerOutputStream);
-
   end;
 
 implementation

+ 1 - 5
CryptoLib/src/Interfaces/ClpIBerOctetStringParser.pas

@@ -22,16 +22,12 @@ unit ClpIBerOctetStringParser;
 interface
 
 uses
-  Classes,
-  ClpIAsn1OctetStringParser,
-  ClpIProxiedInterface;
+  ClpIAsn1OctetStringParser;
 
 type
   IBerOctetStringParser = interface(IAsn1OctetStringParser)
     ['{27698DDF-3584-45F6-8B6D-0AD85AA63F10}']
 
-    function GetOctetStream(): TStream;
-    function ToAsn1Object(): IAsn1Object;
   end;
 
 implementation

+ 0 - 3
CryptoLib/src/Interfaces/ClpIBerSequence.pas

@@ -22,7 +22,6 @@ unit ClpIBerSequence;
 interface
 
 uses
-  ClpIProxiedInterface,
   ClpIDerSequence;
 
 type
@@ -30,8 +29,6 @@ type
 
     ['{B78E91BF-DB39-4033-8A7A-F0D024C5322A}']
 
-    procedure Encode(const derOut: IDerOutputStream);
-
   end;
 
 implementation

+ 0 - 4
CryptoLib/src/Interfaces/ClpIBerSequenceParser.pas

@@ -22,7 +22,6 @@ unit ClpIBerSequenceParser;
 interface
 
 uses
-  ClpIProxiedInterface,
   ClpIAsn1SequenceParser;
 
 type
@@ -30,9 +29,6 @@ type
 
     ['{9383F917-78CD-418C-B9B5-7972B907E8BE}']
 
-    function ReadObject(): IAsn1Convertible;
-    function ToAsn1Object(): IAsn1Object;
-
   end;
 
 implementation

+ 0 - 3
CryptoLib/src/Interfaces/ClpIBerSet.pas

@@ -22,15 +22,12 @@ unit ClpIBerSet;
 interface
 
 uses
-  ClpIProxiedInterface,
   ClpIDerSet;
 
 type
   IBerSet = interface(IDerSet)
     ['{FD8838BB-8905-409A-AB93-136EEC6A05E4}']
 
-    procedure Encode(const derOut: IDerOutputStream);
-
   end;
 
 implementation

+ 0 - 4
CryptoLib/src/Interfaces/ClpIBerSetParser.pas

@@ -22,7 +22,6 @@ unit ClpIBerSetParser;
 interface
 
 uses
-  ClpIProxiedInterface,
   ClpIAsn1SetParser;
 
 type
@@ -30,9 +29,6 @@ type
 
     ['{258A83DA-0C41-444D-9111-9CF7EAAEA54A}']
 
-    function ReadObject(): IAsn1Convertible;
-    function ToAsn1Object(): IAsn1Object;
-
   end;
 
 implementation

+ 0 - 2
CryptoLib/src/Interfaces/ClpIBerTaggedObject.pas

@@ -22,7 +22,6 @@ unit ClpIBerTaggedObject;
 interface
 
 uses
-  ClpIProxiedInterface,
   ClpIDerTaggedObject;
 
 type
@@ -30,7 +29,6 @@ type
 
     ['{DD6A102D-70DC-4428-8199-62D88276BDBA}']
 
-    procedure Encode(const derOut: IDerOutputStream);
   end;
 
 implementation

+ 0 - 7
CryptoLib/src/Interfaces/ClpIBerTaggedObjectParser.pas

@@ -22,7 +22,6 @@ unit ClpIBerTaggedObjectParser;
 interface
 
 uses
-  ClpIProxiedInterface,
   ClpIAsn1TaggedObjectParser;
 
 type
@@ -31,14 +30,8 @@ type
     ['{F1E974C6-6C98-448D-945B-077E63ACB66F}']
 
     function GetIsConstructed: Boolean;
-    function GetTagNo: Int32;
-
-    function GetObjectParser(tag: Int32; isExplicit: Boolean): IAsn1Convertible;
-
-    function ToAsn1Object(): IAsn1Object;
 
     property IsConstructed: Boolean read GetIsConstructed;
-    property TagNo: Int32 read GetTagNo;
 
   end;
 

+ 0 - 2
CryptoLib/src/Interfaces/ClpIConstructedOctetStream.pas

@@ -22,7 +22,6 @@ unit ClpIConstructedOctetStream;
 interface
 
 uses
-  ClpCryptoLibTypes,
   ClpIBaseInputStream;
 
 type
@@ -30,7 +29,6 @@ type
 
     ['{45BD4A14-887D-4B4C-946B-E5DBFA0A6331}']
 
-    function Read(buffer: TCryptoLibByteArray; offset, count: Int32): Int32;
     function ReadByte(): Int32;
 
   end;

+ 0 - 6
CryptoLib/src/Interfaces/ClpIDefiniteLengthInputStream.pas

@@ -30,18 +30,12 @@ type
 
     ['{3828572B-FB58-47A3-826B-6A6AEEBF59E4}']
 
-    function GetRemaining: Int32;
-
     function ReadByte(): Int32;
 
-    function Read(buf: TCryptoLibByteArray; off, len: Int32): Int32;
-
     procedure ReadAllIntoByteArray(buf: TCryptoLibByteArray);
 
     function ToArray: TCryptoLibByteArray;
 
-    property Remaining: Int32 read GetRemaining;
-
   end;
 
 implementation

+ 0 - 5
CryptoLib/src/Interfaces/ClpIDerApplicationSpecific.pas

@@ -32,9 +32,6 @@ type
     function GetApplicationTag: Int32;
     function GetLengthOfHeader(data: TCryptoLibByteArray): Int32;
 
-    function Asn1Equals(const asn1Object: IAsn1Object): Boolean;
-    function Asn1GetHashCode(): Int32;
-
     function isConstructed(): Boolean;
     function GetContents(): TCryptoLibByteArray;
 
@@ -42,8 +39,6 @@ type
 
     function GetObject(derTagNo: Int32): IAsn1Object; overload;
 
-    procedure Encode(const derOut: IDerOutputStream);
-
     property ApplicationTag: Int32 read GetApplicationTag;
 
   end;

+ 0 - 8
CryptoLib/src/Interfaces/ClpIDerBitString.pas

@@ -23,7 +23,6 @@ interface
 
 uses
   ClpCryptoLibTypes,
-  ClpIProxiedInterface,
   ClpIDerStringBase;
 
 type
@@ -37,17 +36,10 @@ type
     function GetmPadBits: Int32;
     property mPadBits: Int32 read GetmPadBits;
 
-    function Asn1GetHashCode(): Int32;
-    function Asn1Equals(const asn1Object: IAsn1Object): Boolean;
-
-    function GetString(): String;
-
     function GetOctets(): TCryptoLibByteArray;
 
     function GetBytes(): TCryptoLibByteArray;
 
-    procedure Encode(const derOut: IDerOutputStream);
-
     function GetInt32Value: Int32;
     property Int32Value: Int32 read GetInt32Value;
 

+ 0 - 7
CryptoLib/src/Interfaces/ClpIDerBmpString.pas

@@ -22,7 +22,6 @@ unit ClpIDerBmpString;
 interface
 
 uses
-  ClpIProxiedInterface,
   ClpIDerStringBase;
 
 type
@@ -32,14 +31,8 @@ type
 
     function GetStr: String;
 
-    function Asn1Equals(const asn1Object: IAsn1Object): Boolean;
-
     property Str: String read GetStr;
 
-    function GetString(): String;
-
-    procedure Encode(const derOut: IDerOutputStream);
-
   end;
 
 implementation

+ 0 - 5
CryptoLib/src/Interfaces/ClpIDerBoolean.pas

@@ -30,11 +30,6 @@ type
 
     function GetIsTrue: Boolean;
 
-    function Asn1Equals(const asn1Object: IAsn1Object): Boolean;
-    function Asn1GetHashCode(): Int32;
-
-    procedure Encode(const derOut: IDerOutputStream);
-
     function ToString(): String;
 
     property IsTrue: Boolean read GetIsTrue;

+ 0 - 5
CryptoLib/src/Interfaces/ClpIDerEnumerated.pas

@@ -33,11 +33,6 @@ type
     function GetValue: TBigInteger;
     function GetBytes: TCryptoLibByteArray;
 
-    function Asn1Equals(const asn1Object: IAsn1Object): Boolean;
-    function Asn1GetHashCode(): Int32;
-
-    procedure Encode(const derOut: IDerOutputStream);
-
     property Value: TBigInteger read GetValue;
     property bytes: TCryptoLibByteArray read GetBytes;
 

+ 10 - 15
CryptoLib/src/Interfaces/ClpIDerExternal.pas

@@ -37,30 +37,25 @@ type
     function GetEncoding: Int32;
     function GetExternalContent: IAsn1Object;
     function GetIndirectReference: IDerInteger;
-    procedure setDataValueDescriptor(const Value: IAsn1Object);
-    procedure setDirectReference(const Value: IDerObjectIdentifier);
-    procedure setEncoding(const Value: Int32);
-    procedure setExternalContent(const Value: IAsn1Object);
-    procedure setIndirectReference(const Value: IDerInteger);
-
-    function Asn1GetHashCode(): Int32;
-    function Asn1Equals(const asn1Object: IAsn1Object): Boolean;
-
-    procedure Encode(const derOut: IDerOutputStream);
+    procedure SetDataValueDescriptor(const Value: IAsn1Object);
+    procedure SetDirectReference(const Value: IDerObjectIdentifier);
+    procedure SetEncoding(const Value: Int32);
+    procedure SetExternalContent(const Value: IAsn1Object);
+    procedure SetIndirectReference(const Value: IDerInteger);
 
     property dataValueDescriptor: IAsn1Object read GetDataValueDescriptor
-      write setDataValueDescriptor;
+      write SetDataValueDescriptor;
 
     property directReference: IDerObjectIdentifier read GetDirectReference
-      write setDirectReference;
+      write SetDirectReference;
 
-    property encoding: Int32 read GetEncoding write setEncoding;
+    property encoding: Int32 read GetEncoding write SetEncoding;
 
     property ExternalContent: IAsn1Object read GetExternalContent
-      write setExternalContent;
+      write SetExternalContent;
 
     property indirectReference: IDerInteger read GetIndirectReference
-      write setIndirectReference;
+      write SetIndirectReference;
 
   end;
 

+ 0 - 1
CryptoLib/src/Interfaces/ClpIDerExternalParser.pas

@@ -28,7 +28,6 @@ type
   IDerExternalParser = interface(IAsn1Encodable)
     ['{6BF2AB32-0307-4E49-BC4C-844ADCD884E0}']
     function ReadObject(): IAsn1Convertible;
-    function ToAsn1Object(): IAsn1Object;
   end;
 
 implementation

+ 0 - 7
CryptoLib/src/Interfaces/ClpIDerGeneralString.pas

@@ -22,7 +22,6 @@ unit ClpIDerGeneralString;
 interface
 
 uses
-  ClpIProxiedInterface,
   ClpCryptoLibTypes,
   ClpIDerStringBase;
 
@@ -33,16 +32,10 @@ type
 
     function GetStr: String;
 
-    function Asn1Equals(const asn1Object: IAsn1Object): Boolean;
-
     property Str: String read GetStr;
 
-    function GetString(): String;
-
     function GetOctets(): TCryptoLibByteArray;
 
-    procedure Encode(const derOut: IDerOutputStream);
-
   end;
 
 implementation

+ 0 - 8
CryptoLib/src/Interfaces/ClpIDerGraphicString.pas

@@ -23,7 +23,6 @@ interface
 
 uses
   ClpCryptoLibTypes,
-  ClpIProxiedInterface,
   ClpIDerStringBase;
 
 type
@@ -32,17 +31,10 @@ type
 
     function GetmString: TCryptoLibByteArray;
 
-    function Asn1GetHashCode(): Int32;
-    function Asn1Equals(const asn1Object: IAsn1Object): Boolean;
-
     property mString: TCryptoLibByteArray read GetmString;
 
-    function GetString(): String;
-
     function GetOctets(): TCryptoLibByteArray;
 
-    procedure Encode(const derOut: IDerOutputStream);
-
   end;
 
 implementation

+ 0 - 8
CryptoLib/src/Interfaces/ClpIDerIA5String.pas

@@ -22,7 +22,6 @@ unit ClpIDerIA5String;
 interface
 
 uses
-  ClpIProxiedInterface,
   ClpCryptoLibTypes,
   ClpIDerStringBase;
 
@@ -33,17 +32,10 @@ type
 
     function GetStr: String;
 
-    function Asn1GetHashCode(): Int32;
-    function Asn1Equals(const asn1Object: IAsn1Object): Boolean;
-
     property Str: String read GetStr;
 
-    function GetString(): String;
-
     function GetOctets(): TCryptoLibByteArray;
 
-    procedure Encode(const derOut: IDerOutputStream);
-
   end;
 
 implementation

+ 0 - 4
CryptoLib/src/Interfaces/ClpIDerInteger.pas

@@ -35,16 +35,12 @@ type
     function GetPositiveValue: TBigInteger;
     function GetValue: TBigInteger;
 
-    function Asn1GetHashCode(): Int32;
-    function Asn1Equals(const asn1Object: IAsn1Object): Boolean;
     function ToString(): String;
 
     property value: TBigInteger read GetValue;
     property PositiveValue: TBigInteger read GetPositiveValue;
     property bytes: TCryptoLibByteArray read GetBytes;
 
-    procedure Encode(const derOut: IDerOutputStream);
-
   end;
 
 implementation

+ 0 - 5
CryptoLib/src/Interfaces/ClpIDerNull.pas

@@ -22,7 +22,6 @@ unit ClpIDerNull;
 interface
 
 uses
-  ClpIProxiedInterface,
   ClpIAsn1Null;
 
 type
@@ -30,10 +29,6 @@ type
 
     ['{0B4ABCBF-DF52-4934-8A43-218D948E1841}']
 
-    function Asn1Equals(const asn1Object: IAsn1Object): Boolean;
-    function Asn1GetHashCode(): Int32;
-
-    procedure Encode(const derOut: IDerOutputStream);
   end;
 
 implementation

+ 0 - 7
CryptoLib/src/Interfaces/ClpIDerNumericString.pas

@@ -22,7 +22,6 @@ unit ClpIDerNumericString;
 interface
 
 uses
-  ClpIProxiedInterface,
   ClpCryptoLibTypes,
   ClpIDerStringBase;
 
@@ -33,16 +32,10 @@ type
 
     function GetStr: String;
 
-    function Asn1Equals(const asn1Object: IAsn1Object): Boolean;
-
     property Str: String read GetStr;
 
-    function GetString(): String;
-
     function GetOctets(): TCryptoLibByteArray;
 
-    procedure Encode(const derOut: IDerOutputStream);
-
   end;
 
 implementation

+ 0 - 4
CryptoLib/src/Interfaces/ClpIDerObjectIdentifier.pas

@@ -40,10 +40,6 @@ type
       fieldValue: TBigInteger); overload;
     procedure DoOutput(bOut: TMemoryStream); overload;
     function GetBody(): TCryptoLibByteArray;
-    procedure Encode(const derOut: IDerOutputStream);
-
-    function Asn1GetHashCode(): Int32;
-    function Asn1Equals(const asn1Object: IAsn1Object): Boolean;
 
     function Branch(const branchID: String): IDerObjectIdentifier;
 

+ 0 - 4
CryptoLib/src/Interfaces/ClpIDerOctetString.pas

@@ -22,8 +22,6 @@ unit ClpIDerOctetString;
 interface
 
 uses
-
-  ClpIProxiedInterface,
   ClpIAsn1OctetString;
 
 type
@@ -31,8 +29,6 @@ type
 
     ['{0FFF8858-026C-49B5-A600-7F746FE6BCF7}']
 
-    procedure Encode(const derOut: IDerOutputStream); overload;
-
   end;
 
 implementation

+ 1 - 5
CryptoLib/src/Interfaces/ClpIDerOctetStringParser.pas

@@ -22,16 +22,12 @@ unit ClpIDerOctetStringParser;
 interface
 
 uses
-  Classes,
-  ClpIAsn1OctetStringParser,
-  ClpIProxiedInterface;
+  ClpIAsn1OctetStringParser;
 
 type
   IDerOctetStringParser = interface(IAsn1OctetStringParser)
     ['{49664C03-CD81-423F-A93D-025D3116B066}']
 
-    function GetOctetStream(): TStream;
-    function ToAsn1Object(): IAsn1Object;
   end;
 
 implementation

+ 0 - 7
CryptoLib/src/Interfaces/ClpIDerPrintableString.pas

@@ -22,7 +22,6 @@ unit ClpIDerPrintableString;
 interface
 
 uses
-  ClpIProxiedInterface,
   ClpCryptoLibTypes,
   ClpIDerStringBase;
 
@@ -33,16 +32,10 @@ type
 
     function GetStr: String;
 
-    function Asn1Equals(const asn1Object: IAsn1Object): Boolean;
-
     property Str: String read GetStr;
 
-    function GetString(): String;
-
     function GetOctets(): TCryptoLibByteArray;
 
-    procedure Encode(const derOut: IDerOutputStream);
-
   end;
 
 implementation

+ 0 - 3
CryptoLib/src/Interfaces/ClpIDerSequence.pas

@@ -22,7 +22,6 @@ unit ClpIDerSequence;
 interface
 
 uses
-  ClpIProxiedInterface,
   ClpIAsn1Sequence;
 
 type
@@ -30,8 +29,6 @@ type
 
     ['{ED1E13E2-6604-4FDE-BDB2-862704A9C90C}']
 
-    procedure Encode(const derOut: IDerOutputStream);
-
   end;
 
 implementation

+ 0 - 4
CryptoLib/src/Interfaces/ClpIDerSequenceParser.pas

@@ -22,7 +22,6 @@ unit ClpIDerSequenceParser;
 interface
 
 uses
-  ClpIProxiedInterface,
   ClpIAsn1SequenceParser;
 
 type
@@ -30,9 +29,6 @@ type
 
     ['{C6B7A49D-C2CC-43A1-9820-7B36AD4FD3B6}']
 
-    function ReadObject(): IAsn1Convertible;
-    function ToAsn1Object(): IAsn1Object;
-
   end;
 
 implementation

+ 0 - 3
CryptoLib/src/Interfaces/ClpIDerSet.pas

@@ -22,7 +22,6 @@ unit ClpIDerSet;
 interface
 
 uses
-  ClpIProxiedInterface,
   ClpIAsn1Set;
 
 type
@@ -31,8 +30,6 @@ type
 
     ['{592C8E57-5B00-4927-AD34-EA4481D436BE}']
 
-    procedure Encode(const derOut: IDerOutputStream);
-
   end;
 
 implementation

+ 0 - 4
CryptoLib/src/Interfaces/ClpIDerSetParser.pas

@@ -22,7 +22,6 @@ unit ClpIDerSetParser;
 interface
 
 uses
-  ClpIProxiedInterface,
   ClpIAsn1SetParser;
 
 type
@@ -30,9 +29,6 @@ type
 
     ['{C9F565EE-4324-4F67-8DC9-E2A305AAD715}']
 
-    function ReadObject(): IAsn1Convertible;
-    function ToAsn1Object(): IAsn1Object;
-
   end;
 
 implementation

+ 0 - 1
CryptoLib/src/Interfaces/ClpIDerStringBase.pas

@@ -29,7 +29,6 @@ type
     ['{710E6D65-28DE-4BFE-9C62-3CFC0E909DD9}']
 
     function GetString(): String;
-    function Asn1GetHashCode(): Int32;
     function ToString(): String;
   end;
 

+ 0 - 7
CryptoLib/src/Interfaces/ClpIDerT61String.pas

@@ -22,7 +22,6 @@ unit ClpIDerT61String;
 interface
 
 uses
-  ClpIProxiedInterface,
   ClpCryptoLibTypes,
   ClpIDerStringBase;
 
@@ -33,16 +32,10 @@ type
 
     function GetStr: String;
 
-    function Asn1Equals(const asn1Object: IAsn1Object): Boolean;
-
     property Str: String read GetStr;
 
-    function GetString(): String;
-
     function GetOctets(): TCryptoLibByteArray;
 
-    procedure Encode(const derOut: IDerOutputStream);
-
   end;
 
 implementation

+ 0 - 2
CryptoLib/src/Interfaces/ClpIDerTaggedObject.pas

@@ -22,7 +22,6 @@ unit ClpIDerTaggedObject;
 interface
 
 uses
-  ClpIProxiedInterface,
   ClpIAsn1TaggedObject;
 
 type
@@ -30,7 +29,6 @@ type
 
     ['{CC77CFAB-8FCF-43E6-8FE4-95EFD99B9731}']
 
-    procedure Encode(const derOut: IDerOutputStream);
   end;
 
 implementation

+ 0 - 7
CryptoLib/src/Interfaces/ClpIDerUniversalString.pas

@@ -22,7 +22,6 @@ unit ClpIDerUniversalString;
 interface
 
 uses
-  ClpIProxiedInterface,
   ClpCryptoLibTypes,
   ClpIDerStringBase;
 
@@ -33,16 +32,10 @@ type
 
     function GetStr: TCryptoLibByteArray;
 
-    function Asn1Equals(const asn1Object: IAsn1Object): Boolean;
-
     property Str: TCryptoLibByteArray read GetStr;
 
-    function GetString(): String;
-
     function GetOctets(): TCryptoLibByteArray;
 
-    procedure Encode(const derOut: IDerOutputStream);
-
   end;
 
 implementation

+ 0 - 7
CryptoLib/src/Interfaces/ClpIDerUtf8String.pas

@@ -22,7 +22,6 @@ unit ClpIDerUtf8String;
 interface
 
 uses
-  ClpIProxiedInterface,
   ClpCryptoLibTypes,
   ClpIDerStringBase;
 
@@ -33,16 +32,10 @@ type
 
     function GetStr: String;
 
-    function Asn1Equals(const asn1Object: IAsn1Object): Boolean;
-
     property Str: String read GetStr;
 
-    function GetString(): String;
-
     function GetOctets(): TCryptoLibByteArray;
 
-    procedure Encode(const derOut: IDerOutputStream);
-
   end;
 
 implementation

+ 0 - 8
CryptoLib/src/Interfaces/ClpIDerVideotexString.pas

@@ -23,7 +23,6 @@ interface
 
 uses
   ClpCryptoLibTypes,
-  ClpIProxiedInterface,
   ClpIDerStringBase;
 
 type
@@ -32,17 +31,10 @@ type
 
     function GetmString: TCryptoLibByteArray;
 
-    function Asn1GetHashCode(): Int32;
-    function Asn1Equals(const asn1Object: IAsn1Object): Boolean;
-
     property mString: TCryptoLibByteArray read GetmString;
 
-    function GetString(): String;
-
     function GetOctets(): TCryptoLibByteArray;
 
-    procedure Encode(const derOut: IDerOutputStream);
-
   end;
 
 implementation

+ 0 - 8
CryptoLib/src/Interfaces/ClpIDerVisibleString.pas

@@ -22,7 +22,6 @@ unit ClpIDerVisibleString;
 interface
 
 uses
-  ClpIProxiedInterface,
   ClpCryptoLibTypes,
   ClpIDerStringBase;
 
@@ -33,17 +32,10 @@ type
 
     function GetStr: String;
 
-    function Asn1GetHashCode(): Int32;
-    function Asn1Equals(const asn1Object: IAsn1Object): Boolean;
-
     property Str: String read GetStr;
 
-    function GetString(): String;
-
     function GetOctets(): TCryptoLibByteArray;
 
-    procedure Encode(const derOut: IDerOutputStream);
-
   end;
 
 implementation

+ 0 - 7
CryptoLib/src/Interfaces/ClpIDigestRandomGenerator.pas

@@ -22,7 +22,6 @@ unit ClpIDigestRandomGenerator;
 interface
 
 uses
-  ClpCryptoLibTypes,
   ClpIRandomGenerator;
 
 type
@@ -30,12 +29,6 @@ type
   IDigestRandomGenerator = interface(IRandomGenerator)
     ['{1D9AA8E6-1709-4121-8835-61A7F543FB54}']
 
-    procedure AddSeedMaterial(inSeed: TCryptoLibByteArray); overload;
-    procedure AddSeedMaterial(rSeed: Int64); overload;
-    procedure NextBytes(bytes: TCryptoLibByteArray); overload;
-    procedure NextBytes(bytes: TCryptoLibByteArray; start, len: Int32);
-      overload;
-
   end;
 
 implementation

+ 0 - 32
CryptoLib/src/Interfaces/ClpIDsaDigestSigner.pas

@@ -24,7 +24,6 @@ interface
 uses
   ClpCryptoLibTypes,
   ClpBigInteger,
-  ClpICipherParameters,
   ClpISigner;
 
 type
@@ -37,37 +36,6 @@ type
     function DerDecode(encoding: TCryptoLibByteArray)
       : TCryptoLibGenericArray<TBigInteger>;
 
-    function GetAlgorithmName: String;
-    property AlgorithmName: String read GetAlgorithmName;
-
-    procedure Init(forSigning: Boolean; const parameters: ICipherParameters);
-
-    /// <summary>
-    /// update the internal digest with the byte b
-    /// </summary>
-    procedure Update(input: Byte);
-
-    /// <summary>
-    /// update the internal digest with the byte array in
-    /// </summary>
-    procedure BlockUpdate(input: TCryptoLibByteArray; inOff, length: Int32);
-
-    /// <summary>
-    /// Generate a signature for the message we've been loaded with using the
-    /// key we were initialised with.
-    /// </summary>
-    function GenerateSignature(): TCryptoLibByteArray;
-
-    /// <returns>
-    /// true if the internal state represents the signature described in the
-    /// passed in array.
-    /// </returns>
-    function VerifySignature(signature: TCryptoLibByteArray): Boolean;
-
-    /// <summary>
-    /// Reset the internal state
-    /// </summary>
-    procedure Reset();
   end;
 
 implementation

+ 1 - 26
CryptoLib/src/Interfaces/ClpIECDsaSigner.pas

@@ -27,8 +27,7 @@ uses
   ClpBigInteger,
   ClpCryptoLibTypes,
   ClpIECInterface,
-  ClpIECFieldElement,
-  ClpICipherParameters;
+  ClpIECFieldElement;
 
 type
   IECDsaSigner = interface(IDsa)
@@ -46,30 +45,6 @@ type
     function InitSecureRandom(needed: Boolean; const provided: ISecureRandom)
       : ISecureRandom;
 
-    function GetAlgorithmName: String;
-    property AlgorithmName: String read GetAlgorithmName;
-
-    procedure Init(forSigning: Boolean; parameters: ICipherParameters);
-
-    // // 5.3 pg 28
-    // /**
-    // * Generate a signature for the given message using the key we were
-    // * initialised with. For conventional DSA the message should be a SHA-1
-    // * hash of the message of interest.
-    // *
-    // * @param message the message that will be verified later.
-    function GenerateSignature(&message: TCryptoLibByteArray)
-      : TCryptoLibGenericArray<TBigInteger>;
-
-    // // 5.4 pg 29
-    // /**
-    // * return true if the value r and s represent a DSA signature for
-    // * the passed in message (for standard DSA the message should be
-    // * a SHA-1 hash of the real message to be verified).
-    // */
-    function VerifySignature(&message: TCryptoLibByteArray; r: TBigInteger;
-      const s: TBigInteger): Boolean;
-
   end;
 
 implementation

+ 0 - 94
CryptoLib/src/Interfaces/ClpIECFieldElement.pas

@@ -82,14 +82,6 @@ type
 
     ['{F5106EAC-DA8F-4815-8403-3D9C5438BF6F}']
 
-    /// <summary>
-    /// return the field name for this field.
-    /// </summary>
-    /// <returns>
-    /// return the string "Fp".
-    /// </returns>
-    function GetFieldName: String;
-    function GetFieldSize: Int32;
     function GetQ: TBigInteger;
 
     function CheckSqrt(const z: IECFieldElement): IECFieldElement;
@@ -105,45 +97,8 @@ type
     function ModReduce(x: TBigInteger): TBigInteger;
     function ModSubtract(const x1, x2: TBigInteger): TBigInteger;
 
-    function ToBigInteger(): TBigInteger;
-
-    property FieldName: string read GetFieldName;
-    property FieldSize: Int32 read GetFieldSize;
-
     property Q: TBigInteger read GetQ;
 
-    function Add(const b: IECFieldElement): IECFieldElement;
-    function AddOne(): IECFieldElement;
-    function Subtract(const b: IECFieldElement): IECFieldElement;
-
-    function Multiply(const b: IECFieldElement): IECFieldElement;
-    function Divide(const b: IECFieldElement): IECFieldElement;
-    function Negate(): IECFieldElement;
-    function Square(): IECFieldElement;
-
-    function Invert(): IECFieldElement;
-
-    /// <summary>
-    /// return a sqrt root - the routine verifies that the calculation
-    /// </summary>
-    /// <returns>
-    /// returns the right value - if none exists it returns null.
-    /// </returns>
-    function Sqrt(): IECFieldElement;
-
-    function MultiplyMinusProduct(const b, x, y: IECFieldElement)
-      : IECFieldElement;
-    function MultiplyPlusProduct(const b, x, y: IECFieldElement)
-      : IECFieldElement;
-
-    function SquareMinusProduct(const x, y: IECFieldElement): IECFieldElement;
-
-    function SquarePlusProduct(const x, y: IECFieldElement): IECFieldElement;
-
-    function Equals(const other: IFpFieldElement): Boolean;
-
-    function GetHashCode(): {$IFDEF DELPHI}Int32; {$ELSE}PtrInt;
-{$ENDIF DELPHI}
   end;
 
 type
@@ -166,49 +121,6 @@ type
     function GetK2: Int32;
     function GetK3: Int32;
 
-    function GetFieldName: String;
-    function GetFieldSize: Int32;
-    function GetBitLength: Int32;
-    function GetIsOne: Boolean;
-    function GetIsZero: Boolean;
-
-    function TestBitZero(): Boolean;
-    function ToBigInteger(): TBigInteger;
-
-    function Add(const b: IECFieldElement): IECFieldElement;
-    function AddOne(): IECFieldElement;
-    function Subtract(const b: IECFieldElement): IECFieldElement;
-
-    function Multiply(const b: IECFieldElement): IECFieldElement;
-    function Divide(const b: IECFieldElement): IECFieldElement;
-    function Negate(): IECFieldElement;
-    function Square(): IECFieldElement;
-
-    function Invert(): IECFieldElement;
-
-    /// <summary>
-    /// return a sqrt root - the routine verifies that the calculation
-    /// </summary>
-    /// <returns>
-    /// returns the right value - if none exists it returns null.
-    /// </returns>
-    function Sqrt(): IECFieldElement;
-
-    function MultiplyMinusProduct(const b, x, y: IECFieldElement)
-      : IECFieldElement;
-    function MultiplyPlusProduct(const b, x, y: IECFieldElement)
-      : IECFieldElement;
-
-    function SquareMinusProduct(const x, y: IECFieldElement): IECFieldElement;
-
-    function SquarePlusProduct(const x, y: IECFieldElement): IECFieldElement;
-
-    function SquarePow(pow: Int32): IECFieldElement;
-
-    function Equals(const other: IF2mFieldElement): Boolean;
-
-    function GetHashCode(): {$IFDEF DELPHI}Int32; {$ELSE}PtrInt;
-{$ENDIF DELPHI}
     // /**
     // * @return the representation of the field
     // * <code>F<sub>2<sup>m</sup></sub></code>, either of
@@ -255,12 +167,6 @@ type
     /// </summary>
     property x: TLongArray read GetX;
 
-    property FieldName: string read GetFieldName;
-    property FieldSize: Int32 read GetFieldSize;
-    property BitLength: Int32 read GetBitLength;
-    property IsOne: Boolean read GetIsOne;
-    property IsZero: Boolean read GetIsZero;
-
   end;
 
 implementation

+ 0 - 110
CryptoLib/src/Interfaces/ClpIECInterface.pas

@@ -192,42 +192,16 @@ type
   IECPointBase = interface(IECPoint)
     ['{66AF58F3-2A82-41AA-B01F-AA4A67CA5E80}']
 
-    /// <summary>
-    /// return the field element encoded with point compression. (S 4.3.6)
-    /// </summary>
-    function GetEncoded(compressed: Boolean): TCryptoLibByteArray;
-
-    /// <summary>
-    /// Multiplies this <c>ECPoint</c> by the given number.
-    /// </summary>
-    /// <param name="k">
-    /// The multiplicator.
-    /// </param>
-    /// <returns>
-    /// <c>k * this</c>
-    /// </returns>
-    function Multiply(k: TBigInteger): IECPoint;
-
   end;
 
   IAbstractFpPoint = interface(IECPointBase)
     ['{57991B0C-7994-4130-93DC-02FEB42E131B}']
 
-    function GetCompressionYTilde(): Boolean;
-
-    function SatisfiesCurveEquation(): Boolean;
-
-    property CompressionYTilde: Boolean read GetCompressionYTilde;
-
-    function Subtract(const b: IECPoint): IECPoint;
-
   end;
 
   IFpPoint = interface(IAbstractFpPoint)
     ['{4113EEFE-A0F1-439B-97FD-921CA1E0A814}']
 
-    function Detach(): IECPoint;
-
     function Two(const x: IECFieldElement): IECFieldElement;
     function Three(const x: IECFieldElement): IECFieldElement;
     function Four(const x: IECFieldElement): IECFieldElement;
@@ -242,33 +216,11 @@ type
 
     function TwiceJacobianModified(calculateW: Boolean): IFpPoint;
 
-    function GetZCoord(index: Int32): IECFieldElement;
-    // B.3 pg 62
-    function Add(const b: IECPoint): IECPoint;
-
-    // B.3 pg 62
-    function Twice(): IECPoint;
-
-    function TwicePlus(const b: IECPoint): IECPoint;
-
-    function ThreeTimes(): IECPoint;
-
-    function TimesPow2(e: Int32): IECPoint;
-
-    function Negate(): IECPoint;
-
   end;
 
   IAbstractF2mPoint = interface(IECPointBase)
     ['{D5231494-74E4-4400-A2FE-8E512411515C}']
 
-    function SatisfiesCurveEquation(): Boolean;
-
-    function ScaleX(const scale: IECFieldElement): IECPoint;
-    function ScaleY(const scale: IECFieldElement): IECPoint;
-
-    function Subtract(const b: IECPoint): IECPoint;
-
     function Tau(): IAbstractF2mPoint;
 
     function TauPow(pow: Int32): IAbstractF2mPoint;
@@ -278,22 +230,6 @@ type
   IF2mPoint = interface(IAbstractF2mPoint)
     ['{ADFE17E0-6A08-430A-970F-353DE2B9426C}']
 
-    function GetYCoord: IECFieldElement;
-    function GetCompressionYTilde: Boolean;
-
-    function Detach(): IECPoint;
-    property CompressionYTilde: Boolean read GetCompressionYTilde;
-
-    function Add(const b: IECPoint): IECPoint;
-
-    function Twice(): IECPoint;
-
-    function TwicePlus(const b: IECPoint): IECPoint;
-
-    function Negate(): IECPoint;
-
-    property YCoord: IECFieldElement read GetYCoord;
-
   end;
 
   // type
@@ -510,9 +446,6 @@ type
   IAbstractFpCurve = interface(IECCurve)
     ['{D37FE528-66B3-4449-A95C-8658A9A89B85}']
 
-    function DecompressPoint(yTilde: Int32; X1: TBigInteger): IECPoint;
-    function IsValidFieldElement(x: TBigInteger): Boolean;
-
   end;
 
 type
@@ -520,25 +453,8 @@ type
     ['{73E49F8B-C63F-4F91-8F40-A4C3B15F47FF}']
 
     function GetQ: TBigInteger;
-    function GetInfinity: IECPoint;
-    function GetFieldSize: Int32;
-
-    function CloneCurve(): IECCurve;
-    function CreateRawPoint(const x, y: IECFieldElement;
-      withCompression: Boolean): IECPoint; overload;
-
-    function CreateRawPoint(const x, y: IECFieldElement;
-      zs: TCryptoLibGenericArray<IECFieldElement>; withCompression: Boolean)
-      : IECPoint; overload;
-
-    function SupportsCoordinateSystem(coord: Int32): Boolean;
 
     property q: TBigInteger read GetQ;
-    property Infinity: IECPoint read GetInfinity;
-    property FieldSize: Int32 read GetFieldSize;
-
-    function FromBigInteger(x: TBigInteger): IECFieldElement;
-    function ImportPoint(const p: IECPoint): IECPoint;
 
   end;
 
@@ -566,13 +482,6 @@ type
     function SolveQuadradicEquation(const beta: IECFieldElement)
       : IECFieldElement;
 
-    function DecompressPoint(yTilde: Int32; X1: TBigInteger): IECPoint;
-
-    function IsValidFieldElement(x: TBigInteger): Boolean;
-
-    function CreatePoint(const x, y: TBigInteger; withCompression: Boolean)
-      : IECPoint; deprecated 'Per-point compression property will be removed';
-
     // /**
     // * @return the auxiliary values <code>s<sub>0</sub></code> and
     // * <code>s<sub>1</sub></code> used for partial modular reduction for
@@ -588,26 +497,11 @@ type
   IF2mCurve = interface(IAbstractF2mCurve)
     ['{B1C98330-51ED-4C0C-91B1-319223483147}']
 
-    function GetFieldSize: Int32;
-    function GetInfinity: IECPoint;
     function GetM: Int32;
     function GetK1: Int32;
     function GetK2: Int32;
     function GetK3: Int32;
 
-    function CloneCurve(): IECCurve;
-    function CreateDefaultMultiplier(): IECMultiplier;
-
-    function CreateRawPoint(const x, y: IECFieldElement;
-      withCompression: Boolean): IECPoint; overload;
-
-    function CreateRawPoint(const x, y: IECFieldElement;
-      zs: TCryptoLibGenericArray<IECFieldElement>; withCompression: Boolean)
-      : IECPoint; overload;
-
-    function SupportsCoordinateSystem(coord: Int32): Boolean;
-    function FromBigInteger(x: TBigInteger): IECFieldElement;
-
     /// <summary>
     /// Return true if curve uses a Trinomial basis.
     /// </summary>
@@ -616,8 +510,6 @@ type
     /// </returns>
     function IsTrinomial(): Boolean;
 
-    property FieldSize: Int32 read GetFieldSize;
-    property Infinity: IECPoint read GetInfinity;
     property m: Int32 read GetM;
     property k1: Int32 read GetK1;
     property k2: Int32 read GetK2;
@@ -625,8 +517,6 @@ type
 
   end;
 
-  //
-
 implementation
 
 end.

+ 0 - 3
CryptoLib/src/Interfaces/ClpIECKeyParameters.pas

@@ -39,9 +39,6 @@ type
     property PublicKeyParamSet: IDerObjectIdentifier read GetPublicKeyParamSet;
     property Parameters: IECDomainParameters read GetParameters;
 
-    function Equals(const other: IECKeyParameters): Boolean;
-    function GetHashCode(): {$IFDEF DELPHI}Int32; {$ELSE}PtrInt;
-{$ENDIF DELPHI}
   end;
 
 implementation

+ 0 - 4
CryptoLib/src/Interfaces/ClpIECPrivateKeyParameters.pas

@@ -32,10 +32,6 @@ type
 
     function GetD: TBigInteger;
     property D: TBigInteger read GetD;
-
-    function Equals(const other: IECPrivateKeyParameters): Boolean;
-    function GetHashCode(): {$IFDEF DELPHI}Int32; {$ELSE}PtrInt;
-{$ENDIF DELPHI}
   end;
 
 implementation

+ 0 - 4
CryptoLib/src/Interfaces/ClpIECPublicKeyParameters.pas

@@ -33,10 +33,6 @@ type
     function GetQ: IECPoint;
 
     property Q: IECPoint read GetQ;
-
-    function Equals(const other: IECPublicKeyParameters): Boolean;
-    function GetHashCode(): {$IFDEF DELPHI}Int32; {$ELSE}PtrInt;
-{$ENDIF DELPHI}
   end;
 
 implementation

+ 1 - 1
CryptoLib/src/Interfaces/ClpIFilterStream.pas

@@ -30,7 +30,7 @@ type
 
     function GetSize: Int64;
     function GetPosition: Int64;
-    procedure setPosition(const Value: Int64);
+    procedure SetPosition(const Value: Int64);
 
     property Size: Int64 read GetSize;
     property Position: Int64 read GetPosition write setPosition;

+ 1 - 5
CryptoLib/src/Interfaces/ClpIFixedPointCombMultiplier.pas

@@ -22,16 +22,12 @@ unit ClpIFixedPointCombMultiplier;
 interface
 
 uses
-  ClpBigInteger,
-  ClpIAbstractECMultiplier,
-  ClpIECInterface;
+  ClpIAbstractECMultiplier;
 
 type
   IFixedPointCombMultiplier = interface(IAbstractECMultiplier)
     ['{A3345E31-4D5C-4442-9C3D-ACC7F6DA4A14}']
 
-    function MultiplyPositive(const p: IECPoint; const k: TBigInteger)
-      : IECPoint;
     function GetWidthForCombSize(combSize: Int32): Int32;
   end;
 

+ 0 - 4
CryptoLib/src/Interfaces/ClpIGF2Polynomial.pas

@@ -29,15 +29,11 @@ type
   IGF2Polynomial = interface(IPolynomial)
     ['{B60318B7-B459-4C09-9D0A-67C84DF794B3}']
 
-    function GetDegree: Int32;
     function GetExponents: TCryptoLibInt32Array;
 
-    function GetExponentsPresent(): TCryptoLibInt32Array;
-
     function Equals(const other: IGF2Polynomial): Boolean;
     function GetHashCode(): {$IFDEF DELPHI}Int32; {$ELSE}PtrInt;
 {$ENDIF DELPHI}
-    property Degree: Int32 read GetDegree;
 
     property exponents: TCryptoLibInt32Array read GetExponents;
 

+ 0 - 13
CryptoLib/src/Interfaces/ClpIGenericPolynomialExtensionField.pas

@@ -23,30 +23,17 @@ interface
 
 uses
   ClpBigInteger,
-  ClpIPolynomial,
-  ClpIFiniteField,
   ClpIPolynomialExtensionField;
 
 type
   IGenericPolynomialExtensionField = interface(IPolynomialExtensionField)
     ['{BB3A963B-38E1-4DF0-A0C6-86DF5CE830FA}']
 
-    function GetCharacteristic: TBigInteger;
-    function GetDegree: Int32;
-    function GetDimension: Int32;
-    function GetMinimalPolynomial: IPolynomial;
-    function GetSubField: IFiniteField;
-
     function Equals(other: TObject): Boolean; overload;
     function Equals(const other: IGenericPolynomialExtensionField)
       : Boolean; overload;
     function GetHashCode(): {$IFDEF DELPHI}Int32; {$ELSE}PtrInt;
 {$ENDIF DELPHI}
-    property Characteristic: TBigInteger read GetCharacteristic;
-    property Dimension: Int32 read GetDimension;
-    property subfield: IFiniteField read GetSubField;
-    property Degree: Int32 read GetDegree;
-    property MinimalPolynomial: IPolynomial read GetMinimalPolynomial;
 
   end;
 

+ 0 - 3
CryptoLib/src/Interfaces/ClpIGlvMultiplier.pas

@@ -22,7 +22,6 @@ unit ClpIGlvMultiplier;
 interface
 
 uses
-  ClpIECInterface,
   ClpBigInteger,
   ClpIAbstractECMultiplier;
 
@@ -30,8 +29,6 @@ type
   IGlvMultiplier = interface(IAbstractECMultiplier)
     ['{F54D54F5-F544-421B-89FC-1D8058FB8F33}']
 
-    function MultiplyPositive(const p: IECPoint; const k: TBigInteger)
-      : IECPoint;
   end;
 
 implementation

+ 0 - 11
CryptoLib/src/Interfaces/ClpIGlvTypeBEndomorphism.pas

@@ -23,25 +23,14 @@ interface
 
 uses
   ClpBigInteger,
-  ClpCryptoLibTypes,
-  ClpIECInterface,
   ClpIGlvEndomorphism;
 
 type
   IGlvTypeBEndomorphism = interface(IGlvEndomorphism)
     ['{4F285F6A-F627-4873-9F4C-FBC7A7B83A9C}']
 
-    function GetHasEfficientPointMap: Boolean;
-    function GetPointMap: IECPointMap;
-
     function CalculateB(const k, g: TBigInteger; t: Int32): TBigInteger;
 
-    function DecomposeScalar(const k: TBigInteger)
-      : TCryptoLibGenericArray<TBigInteger>;
-
-    property PointMap: IECPointMap read GetPointMap;
-    property HasEfficientPointMap: Boolean read GetHasEfficientPointMap;
-
   end;
 
 implementation

+ 0 - 4
CryptoLib/src/Interfaces/ClpIIndefiniteLengthInputStream.pas

@@ -22,8 +22,6 @@ unit ClpIIndefiniteLengthInputStream;
 interface
 
 uses
-  Classes,
-  ClpCryptoLibTypes,
   ClpILimitedInputStream;
 
 type
@@ -36,8 +34,6 @@ type
 
     procedure SetEofOn00(eofOn00: Boolean);
 
-    function Read(buffer: TCryptoLibByteArray; offset, count: Int32): Int32;
-
     function ReadByte(): Int32;
 
   end;

+ 0 - 5
CryptoLib/src/Interfaces/ClpIPrimeField.pas

@@ -29,15 +29,10 @@ type
   IPrimeField = interface(IFiniteField)
     ['{242D0BB8-1F38-4AC2-B7F7-D67AF94F7EEE}']
 
-    function GetCharacteristic: TBigInteger;
-    function GetDimension: Int32;
-
     function Equals(other: TObject): Boolean; overload;
     function Equals(const other: IPrimeField): Boolean; overload;
     function GetHashCode(): {$IFDEF DELPHI}Int32; {$ELSE}PtrInt;
 {$ENDIF DELPHI}
-    property characteristic: TBigInteger read GetCharacteristic;
-    property Dimension: Int32 read GetDimension;
 
   end;
 

+ 0 - 2
CryptoLib/src/Interfaces/ClpIProxiedInterface.pas

@@ -58,8 +58,6 @@ type
 
     function Asn1GetHashCode(): Int32;
 
-    function ToAsn1Object(): IAsn1Object;
-
     procedure Encode(const derOut: IDerOutputStream);
 
     function CallAsn1Equals(const obj: IAsn1Object): Boolean;

+ 0 - 9
CryptoLib/src/Interfaces/ClpIRandomDsaKCalculator.pas

@@ -23,8 +23,6 @@ interface
 
 uses
   ClpBigInteger,
-  ClpCryptoLibTypes,
-  ClpISecureRandom,
   ClpIDsaKCalculator;
 
 type
@@ -32,13 +30,6 @@ type
 
     ['{79C48638-0015-4D65-901B-638D9F4154E4}']
 
-    function GetIsDeterministic: Boolean;
-
-    property IsDeterministic: Boolean read GetIsDeterministic;
-    procedure Init(const n: TBigInteger; const random: ISecureRandom); overload;
-    procedure Init(n, d: TBigInteger; &message: TCryptoLibByteArray); overload;
-    function NextK(): TBigInteger;
-
   end;
 
 implementation

+ 0 - 1
CryptoLib/src/Interfaces/ClpIScaleXPointMap.pas

@@ -28,7 +28,6 @@ type
   IScaleXPointMap = interface(IECPointMap)
 
     ['{3449A622-7472-4B51-A9EF-01B5E586813C}']
-    function Map(const p: IECPoint): IECPoint;
 
   end;
 

+ 0 - 11
CryptoLib/src/Interfaces/ClpIWNafL2RMultiplier.pas

@@ -23,7 +23,6 @@ interface
 
 uses
   ClpBigInteger,
-  ClpIECInterface,
   ClpIAbstractECMultiplier;
 
 type
@@ -31,16 +30,6 @@ type
 
     ['{E2A5E4EF-C092-4F83-ACCF-0FC8731FB274}']
 
-    // /**
-    // * Multiplies <code>this</code> by an integer <code>k</code> using the
-    // * Window NAF method.
-    // * @param k The integer by which <code>this</code> is multiplied.
-    // * @return A new <code>ECPoint</code> which equals <code>this</code>
-    // * multiplied by <code>k</code>.
-    // */
-    function MultiplyPositive(const p: IECPoint; const k: TBigInteger)
-      : IECPoint;
-
     /// <summary>
     /// Determine window width to use for a scalar multiplication of the
     /// given size.

+ 0 - 11
CryptoLib/src/Interfaces/ClpIWTauNafMultiplier.pas

@@ -46,17 +46,6 @@ type
       const lambda: IZTauElement; const preCompInfo: IPreCompInfo;
       a, mu: ShortInt): IAbstractF2mPoint;
 
-    // /**
-    // * Multiplies an AbstractF2mPoint
-    // * by <code>k</code> using the reduced <code>&#964;</code>-adic NAF (RTNAF)
-    // * method.
-    // * @param p The AbstractF2mPoint to multiply.
-    // * @param k The integer by which to multiply <code>k</code>.
-    // * @return <code>p</code> multiplied by <code>k</code>.
-    // */
-    function MultiplyPositive(const point: IECPoint; const k: TBigInteger)
-      : IECPoint;
-
   end;
 
 implementation

+ 0 - 15
CryptoLib/src/Interfaces/ClpIX9Curve.pas

@@ -36,21 +36,6 @@ type
 
     property curve: IECCurve read GetCurve;
 
-    /// <summary>
-    /// <para>
-    /// Produce an object suitable for an Asn1OutputStream. <br />
-    /// &lt;pre&gt;
-    /// </para>
-    /// <para>
-    /// Curve ::= Sequence { a FieldElement, b FieldElement, seed BIT
-    /// STRING OPTIONAL }
-    /// </para>
-    /// <para>
-    /// <br />&lt;/pre&gt;
-    /// </para>
-    /// </summary>
-    function ToAsn1Object(): IAsn1Object;
-
   end;
 
 implementation

+ 0 - 19
CryptoLib/src/Interfaces/ClpIX9FieldElement.pas

@@ -31,25 +31,6 @@ type
 
     function GetValue: IECFieldElement;
 
-    // /**
-    // * Produce an object suitable for an Asn1OutputStream.
-    // * <pre>
-    // *  FieldElement ::= OCTET STRING
-    // * </pre>
-    // * <p>
-    // * <ol>
-    // * <li> if <i>q</i> is an odd prime then the field element is
-    // * processed as an Integer and converted to an octet string
-    // * according to x 9.62 4.3.1.</li>
-    // * <li> if <i>q</i> is 2<sup>m</sup> then the bit string
-    // * contained in the field element is converted into an octet
-    // * string with the same ordering padded at the front if necessary.
-    // * </li>
-    // * </ol>
-    // * </p>
-    // */
-    function ToAsn1Object(): IAsn1Object;
-
     property Value: IECFieldElement read GetValue;
 
   end;

+ 0 - 15
CryptoLib/src/Interfaces/ClpIX9FieldID.pas

@@ -37,21 +37,6 @@ type
 
     property Parameters: IAsn1Object read GetParameters;
 
-    /// <summary>
-    /// <para>
-    /// Produce a Der encoding of the following structure. <br />
-    /// &lt;pre&gt;
-    /// </para>
-    /// <para>
-    /// FieldID ::= Sequence { fieldType FIELD-ID.&amp;amp;id({IOSet}),
-    /// parameters FIELD-ID.&amp;amp;Type({IOSet}{&amp;#64;fieldType})} <br />
-    /// </para>
-    /// <para>
-    /// &lt;/pre&gt; <br />
-    /// </para>
-    /// </summary>
-    function ToAsn1Object(): IAsn1Object;
-
   end;
 
 implementation

+ 2 - 2
CryptoLib/src/Math/ClpNumberStyles.pas

@@ -24,9 +24,9 @@ interface
 type
 {$SCOPEDENUMS ON}
   TNumberStyles = (None = 0, AllowLeadingWhite = 1, AllowTrailingWhite = 2,
-    AllowLeadingSign = 4, AllowTrailingSign = 8, AllowParentheses = 16,
+    AllowLeadingSign = 4, Integer = 4 or 2 or 1, AllowTrailingSign = 8, AllowParentheses = 16,
     AllowDecimalPoint = 32, AllowThousands = 64, AllowExponent = 128,
-    AllowCurrencySymbol = 256, AllowHexSpecifier = 512, Integer = 4 or 2 or 1);
+    AllowCurrencySymbol = 256, AllowHexSpecifier = 512);
 {$SCOPEDENUMS OFF}
 
 implementation

+ 0 - 3
CryptoLib/src/Security/ClpRandom.pas

@@ -36,9 +36,7 @@ type
 
   strict private
   const
-    FMBIG = Int32(2147483647);
     FMSEED = Int32(161803398);
-    FMZ = Int32(0);
 
     class var
 
@@ -148,7 +146,6 @@ begin
 
   Finext := 0;
   Finextp := 21;
-  // Seed := 1;
 end;
 
 function TRandom.InternalSample: Int32;

+ 7 - 9
CryptoLib/src/Utils/IO/ClpFilterStream.pas

@@ -30,24 +30,22 @@ uses
 type
   TFilterStream = class(TStream, IFilterStream)
 
-  strict private
-
-    function GetPosition: Int64;
-    procedure SetPosition(const Value: Int64);
-
-  strict protected
+  protected
   var
     Fs: TStream;
 
+    function GetPosition: Int64; {$IFDEF FPC} override; {$ENDIF FPC}
+    procedure SetPosition(const Value: Int64); {$IFDEF FPC} override;
+{$ENDIF FPC}
     function GetSize: Int64; override;
 
     function QueryInterface({$IFDEF FPC}constref {$ELSE}const
 {$ENDIF FPC} IID: TGUID; out Obj): HResult; {$IFDEF MSWINDOWS} stdcall
-    {$ELSE} cdecl {$ENDIF MSWINDOWS};
+{$ELSE} cdecl {$ENDIF MSWINDOWS};
     function _AddRef: Integer; {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl
-    {$ENDIF MSWINDOWS};
+{$ENDIF MSWINDOWS};
     function _Release: Integer; {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl
-    {$ENDIF MSWINDOWS};
+{$ENDIF MSWINDOWS};
 
   public
     constructor Create(s: TStream);

+ 2 - 2
CryptoLib/src/Utils/IO/ClpStreams.pas

@@ -48,7 +48,7 @@ type
     class procedure PipeAll(inStr, outStr: TStream); static;
     /// <summary>
     /// Pipe all bytes from <c>inStr</c> to <c>outStr</c>, throwing <c>
-    /// ECryptoLibStreamFlowException</c> if greater than <c>limit</c> bytes in <c>
+    /// EStreamOverflowCryptoLibException</c> if greater than <c>limit</c> bytes in <c>
     /// inStr</c>.
     /// </summary>
     /// <param name="inStr">
@@ -64,7 +64,7 @@ type
     /// The number of bytes actually transferred, if not greater than <c>
     /// limit</c>
     /// </returns>
-    /// <exception cref="EIOCryptoLibException" />
+    /// <exception cref="EStreamOverflowCryptoLibException" />
     class function PipeAllLimited(inStr: TStream; limit: Int64;
       outStr: TStream): Int64;