storing crypto
hi guys,
as you know, there is a problem when storing ciphers to disk or when send it thru the network ... problem is that ciphers are random formed at the bits level, and any character could be formed, for example a CR, LF or a protocol character. When this happens, a register or message could be unexpectedly truncated. In order to deal with this, there are proceses to transform hexa numbers to characters, for example the 0xF to "F", and so on. i have two questions: 1. is there a such kind of process to store those ciphers into a database like mysql ? which one ?? what i usually do is to write my own conversion process, but i wonder if there is a standard one for mysql ???... do i have to format a special type of field ???? 2. this is specially true in crypto processes based in bits permutations, such as DES algorithm. I wonder if it also true for prime-big-numbers based algorithms, such as RSA or AES ??? cheers, hector |
Actually, cipher is the method. I think you mean the enciphered text, in which case (for gpg) its the --armor option:
http://www.glump.net/dokuwiki/gpg/gpg_intro ; see '3.4 Publishing Your Public Key' |
yes, chris, tah is the problem but i need a solution for linux / java / bouncy castle :-(
does any one of you knows an equivalent solution ? cheers, hector |
So what is the prob? gpg runs on Linux. I'd expect you can call it from Java. You then save the output into eg a MySQL varchar col, depending on length. Here's the manual for MySQL 5.0 string col types: http://dev.mysql.com/doc/refman/5.0/...ing-types.html
|
All times are GMT -5. The time now is 01:40 PM. |