base64 encoding of AES Keys

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

base64 encoding of AES Keys

Adam Jones-2
 I have two 128 bit keys generated by openssl rand. Does openssl provide a way to BASE64 encode those keys?
Reply | Threaded
Open this post in threaded view
|

Re: base64 encoding of AES Keys

Joseph Oreste Bruni-2
You can encode any data in base64 using the openssl "enc" command. Suppose I have a file named "hello" that contains the text "hello world". The command

$ openssl enc -base64 -in hello -out hello.b64

will encode the file and output the data to "hello.b64". Check the man pages for the "enc" command to find all sort of other options and encodings that are available. Using the "-d" option, the "enc" command will also decode.


On Oct 11, 2005, at 9:42 AM, Adam Jones wrote:

 I have two 128 bit keys generated by openssl rand. Does openssl provide a way to BASE64 encode those keys?

Reply | Threaded
Open this post in threaded view
|

RE: base64 encoding of AES Keys

Adam Jones-2
Thanks! I have been looking to see if there is a function call to do this in code. Are you aware of any?


From: [hidden email] [mailto:[hidden email]] On Behalf Of Joseph Oreste Bruni
Sent: Tuesday, October 11, 2005 12:46 PM
To: [hidden email]
Subject: Re: base64 encoding of AES Keys

You can encode any data in base64 using the openssl "enc" command. Suppose I have a file named "hello" that contains the text "hello world". The command

$ openssl enc -base64 -in hello -out hello.b64

will encode the file and output the data to "hello.b64". Check the man pages for the "enc" command to find all sort of other options and encodings that are available. Using the "-d" option, the "enc" command will also decode.


On Oct 11, 2005, at 9:42 AM, Adam Jones wrote:

I have two 128 bit keys generated by openssl rand. Does openssl provide a way to BASE64 encode those keys?

Reply | Threaded
Open this post in threaded view
|

Re: base64 encoding of AES Keys

Joseph Oreste Bruni-2
The easiest way to do this would be to use a "base64" BIO as a data filter.

At this point I would highly recommend this book:


-Joe

PS: My earlier comment about depleting entropy was entirely facetious. :)



On Oct 11, 2005, at 1:50 PM, Adam Jones wrote:

Thanks! I have been looking to see if there is a function call to do this in code. Are you aware of any?


From: [hidden email] [[hidden email]] On Behalf Of Joseph Oreste Bruni
Sent: Tuesday, October 11, 2005 12:46 PM
To: [hidden email]
Subject: Re: base64 encoding of AES Keys

You can encode any data in base64 using the openssl "enc" command. Suppose I have a file named "hello" that contains the text "hello world". The command

$ openssl enc -base64 -in hello -out hello.b64

will encode the file and output the data to "hello.b64". Check the man pages for the "enc" command to find all sort of other options and encodings that are available. Using the "-d" option, the "enc" command will also decode.


On Oct 11, 2005, at 9:42 AM, Adam Jones wrote:

I have two 128 bit keys generated by openssl rand. Does openssl provide a way to BASE64 encode those keys?



smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: base64 encoding of AES Keys

Adam Jones-2
Thanks! I did see that function in BIO. Didn't know if that was the only one. BTW, I do have the book. Thanks Again!


From: [hidden email] [mailto:[hidden email]] On Behalf Of Joseph Oreste Bruni
Sent: Tuesday, October 11, 2005 4:00 PM
To: [hidden email]
Subject: Re: base64 encoding of AES Keys

The easiest way to do this would be to use a "base64" BIO as a data filter.

At this point I would highly recommend this book:


-Joe

PS: My earlier comment about depleting entropy was entirely facetious. :)



On Oct 11, 2005, at 1:50 PM, Adam Jones wrote:

Thanks! I have been looking to see if there is a function call to do this in code. Are you aware of any?


From: [hidden email] [[hidden email]] On Behalf Of Joseph Oreste Bruni
Sent: Tuesday, October 11, 2005 12:46 PM
To: [hidden email]
Subject: Re: base64 encoding of AES Keys

You can encode any data in base64 using the openssl "enc" command. Suppose I have a file named "hello" that contains the text "hello world". The command

$ openssl enc -base64 -in hello -out hello.b64

will encode the file and output the data to "hello.b64". Check the man pages for the "enc" command to find all sort of other options and encodings that are available. Using the "-d" option, the "enc" command will also decode.


On Oct 11, 2005, at 9:42 AM, Adam Jones wrote:

I have two 128 bit keys generated by openssl rand. Does openssl provide a way to BASE64 encode those keys?