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_oaep_fix_... 16 TMSR : constant String := "TMSR-RSA";
eucrypt_ch12_wrap... 17 MAX_LEN_MSG : constant Natural := OAEP_HALF_OCTETS - TMSR'Length - 3;
eucrypt_ch12_wrap... 18 pragma Export( C, MAX_LEN_MSG, "max_len_msg");
eucrypt_ch10_oaep... 19
eucrypt_ch10_oaep... 20
eucrypt_ch10_oaep... 21 subtype OAEP_Block is String( 1 .. OAEP_LENGTH_OCTETS );
eucrypt_ch10_oaep... 22 subtype OAEP_HALF is String( 1 .. OAEP_HALF_OCTETS );
eucrypt_ch10_oaep... 23
eucrypt_ch12_wrap... 24
eucrypt_ch12_wrap... 25
eucrypt_ch12_wrap... 26
eucrypt_ch12_wrap... 27
eucrypt_ch12_wrap... 28
eucrypt_ch12_wrap... 29
eucrypt_ch12_wrap... 30
eucrypt_ch12_wrap... 31 procedure Char_Array_To_String( A : in Interfaces.C.char_array;
eucrypt_ch12_wrap... 32 Len : in Natural;
eucrypt_ch12_wrap... 33 S : out String);
eucrypt_ch12_wrap... 34
eucrypt_ch12_wrap... 35
eucrypt_ch12_wrap... 36
eucrypt_ch12_wrap... 37
eucrypt_ch12_wrap... 38
eucrypt_ch12_wrap... 39
eucrypt_ch12_wrap... 40 procedure String_To_Char_Array( S : in String;
eucrypt_ch12_wrap... 41 Len : in Natural;
eucrypt_ch12_wrap... 42 A : out Interfaces.C.char_array);
eucrypt_ch12_wrap... 43
eucrypt_ch10_oaep... 44
eucrypt_ch10_oaep... 45
eucrypt_ch10_oaep... 46
eucrypt_ch10_oaep... 47
eucrypt_ch10_oaep... 48
eucrypt_ch10_oaep... 49
eucrypt_ch10_oaep... 50
eucrypt_ch10_oaep... 51
eucrypt_ch10_oaep... 52
eucrypt_ch10_oaep... 53
eucrypt_ch10_oaep... 54
eucrypt_oaep_fix_... 55
eucrypt_ch12_wrap... 56 procedure OAEP_Encrypt( Msg : in String;
eucrypt_ch12_wrap... 57 Entropy : in OAEP_Block;
eucrypt_ch12_wrap... 58 Output : out OAEP_Block);
eucrypt_ch12_wrap... 59
eucrypt_ch12_wrap... 60
eucrypt_ch12_wrap... 61
eucrypt_ch12_wrap... 62
eucrypt_ch12_wrap... 63
eucrypt_ch12_wrap... 64
eucrypt_ch12_wrap... 65
eucrypt_ch12_wrap... 66
eucrypt_ch12_wrap... 67 procedure OAEP_Encrypt_C( Msg : in Interfaces.C.char_array;
eucrypt_ch12_wrap... 68 MsgLen : in Interfaces.C.size_t;
eucrypt_ch12_wrap... 69 Entropy : in Interfaces.C.char_array;
eucrypt_ch12_wrap... 70 EntLen : in Interfaces.C.size_t;
eucrypt_ch12_wrap... 71 Encr : out Interfaces.C.char_array;
eucrypt_ch12_wrap... 72 EncrLen : in Interfaces.C.size_t;
eucrypt_ch12_wrap... 73 Success : out Interfaces.C.Int);
eucrypt_ch12_wrap... 74 pragma Export( C, OAEP_Encrypt_C, "oaep_encrypt_c" );
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 procedure OAEP_Decrypt( Encr : in OAEP_Block;
eucrypt_ch10_oaep... 83 Len : out Natural;
eucrypt_ch10_oaep... 84 Output : out OAEP_HALF;
eucrypt_ch10_oaep... 85 Success : out Boolean);
eucrypt_ch10_oaep... 86
eucrypt_ch12_wrap... 87
eucrypt_ch12_wrap... 88 procedure oaep_decrypt_c( Encr : in Interfaces.C.Char_Array;
eucrypt_ch12_wrap... 89 EncrLen : in Interfaces.C.Int;
eucrypt_ch12_wrap... 90 Decr : out Interfaces.C.Char_Array;
eucrypt_ch12_wrap... 91 DecrLen : in out Interfaces.C.Int;
eucrypt_ch12_wrap... 92 Success : out Interfaces.C.Int);
eucrypt_ch12_wrap... 93 pragma Export( C, oaep_decrypt_c, "oaep_decrypt_c");
eucrypt_ch12_wrap... 94
eucrypt_ch10_oaep... 95
eucrypt_ch10_oaep... 96
eucrypt_ch10_oaep... 97
eucrypt_ch10_oaep... 98 procedure XOR_Strings( S1: in String; S2: in String; Output: out String );
eucrypt_ch10_oaep... 99
eucrypt_ch10_oaep... 100
eucrypt_ch10_oaep... 101 function Shift_Right( Value : Unsigned_8;
eucrypt_ch10_oaep... 102 Amount : Natural )
eucrypt_ch10_oaep... 103 return Unsigned_8;
eucrypt_ch10_oaep... 104 pragma Import(Intrinsic, Shift_Right);
eucrypt_ch10_oaep... 105
eucrypt_ch10_oaep... 106 function Shift_Left( Value : Unsigned_8;
eucrypt_ch10_oaep... 107 Amount : Natural )
eucrypt_ch10_oaep... 108 return Unsigned_8;
eucrypt_ch10_oaep... 109 pragma Import(Intrinsic, Shift_Left);
eucrypt_ch10_oaep... 110
eucrypt_ch16_byte... 111
eucrypt_ch10_oaep... 112
eucrypt_ch16_byte... 113 procedure ToString( B: in Bytestream; S: out String );
eucrypt_ch16_byte... 114 procedure ToBytestream( S: in String; B: out Bytestream );
eucrypt_ch10_oaep... 115
eucrypt_ch10_oaep... 116
eucrypt_ch10_oaep... 117 procedure HashKeccak( Input : in String;
eucrypt_ch10_oaep... 118 Output : out String;
eucrypt_ch16_byte... 119 Block_Len : in Keccak_Rate := Default_Byterate);
eucrypt_ch10_oaep... 120
eucrypt_ch16_byte... 121
eucrypt_ch10_oaep... 122
eucrypt_ch12_wrap... 123
eucrypt_ch12_wrap... 124
eucrypt_ch12_wrap... 125
eucrypt_ch10_oaep... 126
eucrypt_ch10_oaep... 127
eucrypt_ch12_wrap... 128 procedure Hash( Input : in Interfaces.C.Char_Array;
eucrypt_ch12_wrap... 129 LenIn : in Interfaces.C.size_t;
eucrypt_ch12_wrap... 130 LenOut : in Interfaces.C.size_t;
eucrypt_ch12_wrap... 131 Output : out Interfaces.C.Char_Array);
eucrypt_ch10_oaep... 132 pragma Export( C, Hash, "hash" );
eucrypt_ch10_oaep... 133
eucrypt_ch10_oaep... 134 end SMG_OAEP;