diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-08-22 11:16:00 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-08-22 11:16:00 +0200 |
commit | accc6fa7aa2d52f338fa5123b28292e594b605e9 (patch) | |
tree | 25602b8489a8b1f5759b0c64dd457f8c015d3bfe | |
parent | 172a5b864f3ae6890b1cfc297cf9053b33fd8ee1 (diff) | |
download | cryptodev-linux-accc6fa7aa2d52f338fa5123b28292e594b605e9.tar.gz cryptodev-linux-accc6fa7aa2d52f338fa5123b28292e594b605e9.tar.xz cryptodev-linux-accc6fa7aa2d52f338fa5123b28292e594b605e9.zip |
When calculating algorithm strength consider 3DES as 112 bit cipher.
-rw-r--r-- | ncr-key.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -557,7 +557,12 @@ int _ncr_key_get_sec_level(struct key_item_st* item) { int bits; + /* FIXME: should we move everything here into algorithm properties? + */ if (item->type == NCR_KEY_TYPE_SECRET) { + if (item->algorithm->algo == NCR_ALG_3DES_CBC) + return 112; + return item->key.secret.size*8; } else if (item->type == NCR_KEY_TYPE_PRIVATE) { switch(item->algorithm->algo) { |