What is a somewhat secure way to generate a 64-bit signature?

I would like to sign the device, and I have 64 bits to store my signature on the device. This device has a MAC address and some other details (about 30 bytes), I can cripple to create my signature.

If possible, I would like the method to be unilateral, so I can verify that the signature is valid without knowing how to create a valid signature. Most public keys have this feature, but they generate 48 bytes signatures (I have only 8 bytes).

Python implementation is a plus.

thank

EDIT : Thanks for the advice to everyone. It seems that there is no safe way to do this, only a way that is inconvenient for attackers. I probably use a cryptographic hash in combination with a secret bit shuffle. It will be as safe as any other link in my (very weak) "security".

+3
source share
3 answers

Hash functions and digital signatures are very different things.

The size of the digital signature depends on the underlying hash function and key length. Theoretically, you can create an RSA implementation that generates 64-bit signatures, but it will be a very weak signature.

For shorter key lengths, you can see cryptography with an elliptic curve.

EDIT: , .

2: , -, elf64 RIPEMD-64, .

3: , 16- ECC 64- , . ECC , 128 , . RSA 1024 .

+5

64- -, Ripemd-64 elf-64. 64- . , 64- , - 128 . .

+3

(MD5 SHA1) 30 .
, , - , . .

Edit - sorry, I thought MD5 returned 32 bytes - it actaulyl returns 16bytes, but it is usually written as 32hex digits.

0
source

Source: https://habr.com/ru/post/1699388/


All Articles