ADDED: Hash-based message authentication code (HMAC), using hmac(Key).

This commit is contained in:
Markus Triska
2024-02-22 20:17:20 +01:00
parent d4bde5008d
commit 27852eafd7
4 changed files with 63 additions and 3 deletions

View File

@@ -4464,6 +4464,14 @@ impl Machine {
self.crypto_data_hash();
step_or_fail!(self, self.machine_st.p = self.machine_st.cp);
}
&Instruction::CallCryptoHMAC => {
self.crypto_hmac();
step_or_fail!(self, self.machine_st.p += 1);
}
&Instruction::ExecuteCryptoHMAC => {
self.crypto_hmac();
step_or_fail!(self, self.machine_st.p = self.machine_st.cp);
}
&Instruction::CallCryptoDataHKDF => {
self.crypto_data_hkdf();
step_or_fail!(self, self.machine_st.p += 1);