Coherence
Search…
CMAC

MAC

In order to understand hex and type parameters read Hash

CMAC

spec
Description: Message authentication code based on block cipher.
Uses: When a block cipher is more readily available than a hash function

How to ???

1
import requests
2
import json
3
import os,binascii
4
5
def sending(message):
6
url = 'http://127.0.0.1:6613/'
7
response = requests.post(url, data=message)
8
print response.content
9
return response.content
10
11
data_js='{"version":1,"algorithm":"CMAC","type":"string","plaintext":"Hello world!",\
12
"hex":0,"key":"0123456789ABCDEF0123456789ABCDEF","family":"aes"}'
13
sending(data_js)
Copied!
Calculate CMAC-AES to string "Hello world!" with the key given.
On data_js["family"] can be one of {"aes", "rc6", "mars","serpent","twofish', "cast256"}
Json to HMAC string
1
{"version":1,"algorithm":"CMAC","type":"string","plaintext":"your string","hex":BOOL,
2
"key":"Hex stringsize=32-64","family":"block flavor"}
Copied!
Json to HMAC file
1
{"version":1,"algorithm":"CMAC","type":"file","file":"your file",
2
"key":"Hex stringsize=32-64","family":"block flavor"}
Copied!
Copy link