-
+ 57AD398331BF9B99C93592FCA3BDEFF7CA8EBFD630EC3FC142706498EB4A7DCB05F21520670D5945C26046237C7DE2C93E021801157B5BF8BF99308FB004D8E4
smg_comms/tests/io_rsa.ads
(0 . 0)(1 . 21)
108 -- reading a RSA key pair from a file
109 -- NB: this is for TESTING purposes only, NOT a production IO package!
110 -- S.MG, 2018
111
112 with Raw_Types;
113 with RSA_OAEP;
114
115 package IO_RSA is
116
117 -- reads a full private key from specified file, in Hex format
118 -- one component per line, in order: n, e, d, p, q, u
119 -- NB: length of each component has to match *precisely* the expected length
120 -- specifically, using Raw_Types:
121 -- n, d are RSA_len'Length*2;
122 -- e, p, q, u are RSA_half'Length*2
123 procedure ReadRSAKey( Filename: in String; Key: out RSA_OAEP.RSA_skey );
124
125 -- convert hexadecimal strings to octets representation
126 procedure Hex2Octets( Hex: in String; O: out Raw_Types.Octets );
127
128 end IO_RSA;