Skip to content

Instantly share code, notes, and snippets.

@notmyname
Created June 23, 2016 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save notmyname/6b29fb06a7d32c9ee5911896265ece8b to your computer and use it in GitHub Desktop.
Save notmyname/6b29fb06a7d32c9ee5911896265ece8b to your computer and use it in GitHub Desktop.
diff --git a/swift/common/middleware/crypto_utils.py b/swift/common/middleware/crypto_utils.py
index b2fcb03..4368a47 100644
--- a/swift/common/middleware/crypto_utils.py
+++ b/swift/common/middleware/crypto_utils.py
@@ -34,7 +34,7 @@ CRYPTO_KEY_CALLBACK = 'swift.callback.fetch_crypto_keys'
# AES will accept several key sizes - we are using 256 bits i.e. 32 bytes
-KEY_LENGTH = 32
+KEY_LENGTH = 48
class Crypto(object):
diff --git a/swift/common/middleware/keymaster.py b/swift/common/middleware/keymaster.py
index 91f041f..ed92596 100644
--- a/swift/common/middleware/keymaster.py
+++ b/swift/common/middleware/keymaster.py
@@ -131,7 +131,7 @@ class KeyMaster(object):
def create_key(self, key_id):
return hmac.new(self.root_secret, key_id,
- digestmod=hashlib.sha256).digest()
+ digestmod=hashlib.sha384).digest()
def filter_factory(global_conf, **local_conf):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment