Skip to content

Commit

Permalink
Verify master key signatures in constant time
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Dec 7, 2019
1 parent 63fc65d commit 532c6ad
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ fun pokeMasterSigningKey() {
}

private fun verifyWithMasterSigningKey(signature: ByteArray, vararg data: ByteArray): Boolean {
return signWithMasterSigningKey(*data).contentEquals(signature)
return MessageDigest.isEqual(signWithMasterSigningKey(*data), signature)
}

data class Assertion(val authenticatorData: ByteArray, val signature: ByteArray) {
Expand Down

0 comments on commit 532c6ad

Please sign in to comment.