Skip to content

Commit

Permalink
Adds sm3_256 to the known hash algorithms
Browse files Browse the repository at this point in the history
This algorithm is seen in Nationz chips, and is in the TCG standard.
Adds sm3_256 to known algorithms, otherwise keylime refuses to run
when the tpm_hash_alg is set to sm3_256.

Signed-off-by: Kaifeng Wang <[email protected]>
  • Loading branch information
kaifeng authored and mpeters committed Mar 3, 2021
1 parent 09b0c08 commit 390284b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion keylime/common/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ class Hash:
SHA256 = 'sha256'
SHA384 = 'sha384'
SHA512 = 'sha512'
supported_algorithms = (SHA1, SHA256, SHA384, SHA512)
SM3_256 = 'sm3_256'
supported_algorithms = (SHA1, SHA256, SHA384, SHA512, SM3_256)

@staticmethod
def is_recognized(algorithm):
Expand Down

0 comments on commit 390284b

Please sign in to comment.