mirror of
https://github.com/brmlab/brmdoor_libnfc.git
synced 2025-06-07 16:14:01 +02:00
Authentication with NDEF message on Desfire containing signed UID via Ed25519
This commit is contained in:
parent
892b69f939
commit
d0121aaed9
12 changed files with 286 additions and 41 deletions
19
generate_ed25519_keypair.py
Executable file
19
generate_ed25519_keypair.py
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env python2
|
||||
|
||||
"""
|
||||
Used to generate keypair for signing NDEF messages for Mifare NDEF authentication
|
||||
"""
|
||||
|
||||
import os
|
||||
import axolotl_curve25519 as curve
|
||||
|
||||
from binascii import hexlify
|
||||
|
||||
random32 = os.urandom(32)
|
||||
|
||||
private_key = curve.generatePrivateKey(random32)
|
||||
public_key = curve.generatePublicKey(private_key)
|
||||
|
||||
print "private key in hex:", hexlify(private_key)
|
||||
print "public key in hex :", hexlify(public_key)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue