Coherence
Search…
Poly1305
In order to understand hex and type parameters read HASH

Poly1305

spec
Description: Message authentication code based on block cipher.
Uses: Performance is important
Key size: 256 bits
Nonce size: 128 bits

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":"POLY1305","type":"string","plaintext":"Hello world!","hex":0,"key":"0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF","nonce":"0123456789ABCDEF0123456789ABCDEF"}'
12
sending(data_js)
Copied!
In this example we generate POLY1305 to hex string Hello world! with the key and nonce given.
Json to poly1035 string
1
{"version":1,"algorithm":"POLY1305","type":"string","plaintext":"your string ",
2
"hex": BOOL,"key":"Hex string size=32,48,64","nonce":"Hex string size=32"}
Copied!
Json to poly1035 file
1
{"version":1,"algorithm":"POLY1305","type":"file","file":"your file","hex": BOOL,
2
"key":"Hex stringsize=32,48,64","nonce":"Hex string size=32"}
Copied!
Copy link