Compress everything. Trust nothing. Encrypt always.

This commit is contained in:
Cristian Cezar Moisés 2026-03-21 22:06:03 -03:00
commit c80332778f
31 changed files with 7347 additions and 0 deletions

22
src/zupt_x25519.h Normal file
View file

@ -0,0 +1,22 @@
/*
* Zupt Backup-oriented compression with AES-256 encryption
* Copyright (c) 2026 Cristian Cezar Moisés
* SPDX-License-Identifier: MIT
*
* X25519 Diffie-Hellman key agreement (RFC 7748).
* Montgomery ladder constant-time by construction.
*/
#ifndef ZUPT_X25519_H
#define ZUPT_X25519_H
#include <stdint.h>
/* X25519(scalar, point) → result. All inputs/outputs are 32 bytes.
* CT-REQUIRED: Montgomery ladder is inherently constant-time. */
void zupt_x25519(uint8_t out[32], const uint8_t scalar[32], const uint8_t point[32]);
/* X25519 with the standard basepoint (9).
* Used for keygen: public = X25519(private, basepoint). */
void zupt_x25519_base(uint8_t out[32], const uint8_t scalar[32]);
#endif