|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
|
|
|
Re: {Spam?} Re: loading psk credentials from encrypted fileMichael Weiser wrote:
> A few days ago I had an idea though: Why not abuse the PKCS12 functions > to save the datum_t holding the PSK key out in an encrypted PKCS12 > structure? What are the reasons for doing that? Is it for distributing the actual key to clients? For protecting the whole password file maybe pkcs-12 is too much, and saving the password file into an encrypted partition might be simpler. > The code looks as shown below (without the error checking for > readability). It works fine, but my questions are: > > - Is this at all sensible or (will it break|is it braindead|other > reason for never ever doing it)? I don't like pkcs-12 due to it's complexity, but nevertheless there is nothing (else) wrong with it and pretty much seems to fit here. > - Is my PSK key secure this way or do I have an inherent security hole > somewhere? Depends on how is it going to be used. > - Can I use something stronger than RC4-128 for encryption? I believe PKCS-12 supports 3DES as well. > - Can I have my own bag type GNUTLS_BAG_PSK_KEY so I don't need to abuse > GNUTLS_BAG_CERTIFICATE? ;) Or should/can I use GNUTLS_BAG_ENCRYPTED > for generic encrypted data? In ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-12/pkcs-12.asn I can see a secretbag that is underdefined though. If you want to use that you might need to do some checking on whether someone already uses this bag type to put octet data (the asn.1 wording for bytes) there. If yes I think the modifications to gnutls to support it should be minor. If noone uses it might be possible to use some object identifier (OID) to define just a blob. best regards, Nikos _______________________________________________ Help-gnutls mailing list Help-gnutls@... http://lists.gnu.org/mailman/listinfo/help-gnutls |
|
|
Re: {Spam?} Re: loading psk credentials from encrypted fileHi Nikos,
On Sat, Oct 24, 2009 at 04:34:55AM +0300, Nikos Mavrogiannopoulos wrote: > > A few days ago I had an idea though: Why not abuse the PKCS12 functions > > to save the datum_t holding the PSK key out in an encrypted PKCS12 > > structure? > What are the reasons for doing that? Is it for distributing the actual > key to clients? For protecting the whole password file maybe pkcs-12 is > too much, and saving the password file into an encrypted partition might > be simpler. Yes, it's meant for storage of keys on the client. I thought about an encrypted filesystem container as well, but then the key is vulnerable as long as that container is mounted. It also adds at least two more steps to startup of my client. Of course, they can be automated by a script. But that together with a whole encrypted container for 64 bytes of data seems even more overkill to mee. If the key is in an encrypted file all by itself, someone wanting to extract it would need much more access than just mixed up filesystem permissions. > > The code looks as shown below (without the error checking for > > readability). It works fine, but my questions are: > > > > - Is this at all sensible or (will it break|is it braindead|other > > reason for never ever doing it)? > I don't like pkcs-12 due to it's complexity, but nevertheless there is > nothing (else) wrong with it and pretty much seems to fit here. What SSH does with it's identities is much what I'd like. After looking at their code, I despaired of being able to get it implemented without major breakage. PKCS12 might be complex on the inside but GNUTLS's PKCS12 API to me as developer is nicely simple. If there were something similarly simple API-wise with support for stronger ciphers and perhaps even a simpler internal structure, I'd jump on it. :) > > - Can I use something stronger than RC4-128 for encryption? > I believe PKCS-12 supports 3DES as well. Is there a way of adding something like AES-256? -- Thanks, Micha _______________________________________________ Help-gnutls mailing list Help-gnutls@... http://lists.gnu.org/mailman/listinfo/help-gnutls |
|
|
Re: {Spam?} Re: loading psk credentials from encrypted fileMichael Weiser wrote:
>>> - Is this at all sensible or (will it break|is it braindead|other >>> reason for never ever doing it)? >> I don't like pkcs-12 due to it's complexity, but nevertheless there is >> nothing (else) wrong with it and pretty much seems to fit here. > > What SSH does with it's identities is much what I'd like. After looking > at their code, I despaired of being able to get it implemented without > major breakage. > > PKCS12 might be complex on the inside but GNUTLS's PKCS12 API to me as > developer is nicely simple. If there were something similarly simple > API-wise with support for stronger ciphers and perhaps even a simpler > internal structure, I'd jump on it. :) > >>> - Can I use something stronger than RC4-128 for encryption? >> I believe PKCS-12 supports 3DES as well. > > Is there a way of adding something like AES-256? I've checked a bit and it seems there is a definition of the AES family in PKCS #5 2.1 (PBES). I have added support for them in the git repository. About using the secret bag, from a quick glimpse it seems it can only be used with a custom extension. regards, Nikos _______________________________________________ Help-gnutls mailing list Help-gnutls@... http://lists.gnu.org/mailman/listinfo/help-gnutls |
| Free embeddable forum powered by Nabble | Forum Help |