LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   storing crypto (https://www.linuxquestions.org/questions/fedora-35/storing-crypto-656169/)

hectorDUQUE 07-16-2008 12:23 PM

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

chrism01 07-16-2008 11:19 PM

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'

hectorDUQUE 07-17-2008 11:18 AM

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

chrism01 07-18-2008 04:06 AM

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.