Skip to content

Commit

Permalink
Fix issue when using AES-CTR with non-default digest method
Browse files Browse the repository at this point in the history
Credsmash was using the wrong output key.

Resolves #3
  • Loading branch information
nathan-muir committed Feb 21, 2017
1 parent 3ac534f commit 6a5f59f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions credsmash/crypto/aes_ctr.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def Binary(value):
'contents': Binary(ciphertext),
'hmac': Binary(hmac),
'nonce': Binary(nonce),
'digest_method': digest_method,
'digest': digest_method,
'algorithm': ALGO_AES_CTR,
}

Expand Down Expand Up @@ -104,7 +104,7 @@ def seal_aes_ctr_legacy(key_service, secret, digest_method=DEFAULT_DIGEST):
'key': b64encode(encoded_key).decode('utf-8'),
'contents': b64encode(ciphertext).decode('utf-8'),
'hmac': hmac.encode('hex'),
'digest_method': digest_method,
'digest': digest_method,
}


Expand Down

0 comments on commit 6a5f59f

Please sign in to comment.