(13 . 6)(13 . 8)
59 OAEP_LENGTH_BITS : constant := 4096;
60 OAEP_LENGTH_OCTETS : constant := 512;
61 OAEP_HALF_OCTETS : constant := OAEP_LENGTH_OCTETS / 2;
62 TMSR : constant String := "TMSR-RSA";
63 MAX_LEN_MSG : constant := OAEP_HALF_OCTETS - TMSR'Length - 3;
64
65 -- subtypes used by the OAEP encrypt/decrypt
66 subtype OAEP_Block is String( 1 .. OAEP_LENGTH_OCTETS );
(29 . 7)(31 . 7)
68 -- 5. Result is X || Y
69 -- NB: the Entropy parameter should be random octets from which this method
70 -- will use as many as required for the OAEP encryption of given Msg
71 -- NB: at MOST OAEP_LENGTH_OCTETS - 11 octets of Msg! (Msg at most 1960 bits)
72 -- NB: at MOST MAX_LEN_MSG octets of Msg! (Msg at most 1960 bits)
73 procedure OAEP_Encrypt( Msg : in String;
74 Entropy : in OAEP_Block;
75 Output : out OAEP_Block);