Skip to content

aCinal/esp-x25519

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

X25519 for ESP32 and ESP32-S3

Constant-time (architecturally) implementation of X25519 Diffie-Hellman key exchange for Xtensa LX6 and LX7. Shipped as an ESP-IDF component. Tested with ESP-IDF v5.5.

Usage

#include <esp-x25519.h>

{
    unsigned char secret_key[32] = {
        0xd0, 0x66, 0x3c, 0xcc, 0xff, 0x48, 0x1c, 0x1d,
        0x1d, 0x5a, 0xe6, 0x1d, 0xdb, 0x79, 0xb8, 0x8b,
        0x05, 0x57, 0x14, 0x57, 0xcc, 0x17, 0x54, 0xa0,
        0xf3, 0x54, 0xd6, 0x2e, 0xcb, 0x12, 0x42, 0x69
    };
    unsigned char public_key[32] = { 9 };
    unsigned char shared_secret[32];

    xtensa_curve25519(shared_secret, secret_key, public_key);
}

About

X25519 optimized for Xtensa MAC16

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published