eucrypt_ch10_oaep... 1
eucrypt_ch10_oaep... 2
eucrypt_ch10_oaep... 3
eucrypt_ch10_oaep... 4
eucrypt_ch10_oaep... 5 with SMG_Keccak; use SMG_Keccak;
eucrypt_ch10_oaep... 6 with Interfaces; use Interfaces;
eucrypt_ch10_oaep... 7 with Interfaces.C; use Interfaces.C;
eucrypt_ch10_oaep... 8
eucrypt_ch10_oaep... 9 package SMG_OAEP is
eucrypt_ch10_oaep... 10 pragma Pure( SMG_OAEP );
eucrypt_ch10_oaep... 11
eucrypt_ch10_oaep... 12
eucrypt_ch10_oaep... 13 OAEP_LENGTH_BITS : constant := 4096;
eucrypt_ch10_oaep... 14 OAEP_LENGTH_OCTETS : constant := 512;
eucrypt_ch10_oaep... 15 OAEP_HALF_OCTETS : constant := OAEP_LENGTH_OCTETS / 2;
eucrypt_ch10_oaep... 16
eucrypt_ch10_oaep... 17
eucrypt_ch10_oaep... 18 subtype OAEP_Block is String( 1 .. OAEP_LENGTH_OCTETS );
eucrypt_ch10_oaep... 19 subtype OAEP_HALF is String( 1 .. OAEP_HALF_OCTETS );
eucrypt_ch10_oaep... 20
eucrypt_ch10_oaep... 21
eucrypt_ch10_oaep... 22
eucrypt_ch10_oaep... 23
eucrypt_ch10_oaep... 24
eucrypt_ch10_oaep... 25
eucrypt_ch10_oaep... 26
eucrypt_ch10_oaep... 27
eucrypt_ch10_oaep... 28
eucrypt_ch10_oaep... 29
eucrypt_ch10_oaep... 30
eucrypt_ch10_oaep... 31
eucrypt_ch10_oaep... 32
eucrypt_ch10_oaep... 33 procedure OAEP_Encrypt( Msg : in String;
eucrypt_ch10_oaep... 34 Entropy : in OAEP_Block;
eucrypt_ch10_oaep... 35 Output : out OAEP_Block);
eucrypt_ch10_oaep... 36
eucrypt_ch10_oaep... 37
eucrypt_ch10_oaep... 38
eucrypt_ch10_oaep... 39
eucrypt_ch10_oaep... 40
eucrypt_ch10_oaep... 41
eucrypt_ch10_oaep... 42
eucrypt_ch10_oaep... 43 procedure OAEP_Decrypt( Encr : in OAEP_Block;
eucrypt_ch10_oaep... 44 Len : out Natural;
eucrypt_ch10_oaep... 45 Output : out OAEP_HALF;
eucrypt_ch10_oaep... 46 Success : out Boolean);
eucrypt_ch10_oaep... 47
eucrypt_ch10_oaep... 48
eucrypt_ch10_oaep... 49
eucrypt_ch10_oaep... 50
eucrypt_ch10_oaep... 51 procedure XOR_Strings( S1: in String; S2: in String; Output: out String );
eucrypt_ch10_oaep... 52
eucrypt_ch10_oaep... 53
eucrypt_ch10_oaep... 54 function Shift_Right( Value : Unsigned_8;
eucrypt_ch10_oaep... 55 Amount : Natural )
eucrypt_ch10_oaep... 56 return Unsigned_8;
eucrypt_ch10_oaep... 57 pragma Import(Intrinsic, Shift_Right);
eucrypt_ch10_oaep... 58
eucrypt_ch10_oaep... 59 function Shift_Left( Value : Unsigned_8;
eucrypt_ch10_oaep... 60 Amount : Natural )
eucrypt_ch10_oaep... 61 return Unsigned_8;
eucrypt_ch10_oaep... 62 pragma Import(Intrinsic, Shift_Left);
eucrypt_ch10_oaep... 63
eucrypt_ch10_oaep... 64
eucrypt_ch10_oaep... 65
eucrypt_ch10_oaep... 66 procedure ToString( B: in Bitstream; S: out String );
eucrypt_ch10_oaep... 67 procedure ToBitstream( S: in String; B: out Bitstream );
eucrypt_ch10_oaep... 68
eucrypt_ch10_oaep... 69
eucrypt_ch10_oaep... 70 procedure HashKeccak( Input : in String;
eucrypt_ch10_oaep... 71 Output : out String;
eucrypt_ch10_oaep... 72 Block_Len : in Keccak_Rate := Default_Bitrate);
eucrypt_ch10_oaep... 73
eucrypt_ch10_oaep... 74
eucrypt_ch10_oaep... 75
eucrypt_ch10_oaep... 76
eucrypt_ch10_oaep... 77
eucrypt_ch10_oaep... 78
eucrypt_ch10_oaep... 79
eucrypt_ch10_oaep... 80
eucrypt_ch10_oaep... 81
eucrypt_ch10_oaep... 82
eucrypt_ch10_oaep... 83 function Hash( Input : Interfaces.C.Char_Array;
eucrypt_ch10_oaep... 84 LenIn : Interfaces.C.size_t;
eucrypt_ch10_oaep... 85 LenOut : Interfaces.C.size_t;
eucrypt_ch10_oaep... 86 Block_Len : Interfaces.C.int := Default_Bitrate)
eucrypt_ch10_oaep... 87 return Interfaces.C.Char_Array;
eucrypt_ch10_oaep... 88 pragma Export( C, Hash, "hash" );
eucrypt_ch10_oaep... 89
eucrypt_ch10_oaep... 90 end SMG_OAEP;