Skip to content

WIP: add additional crypto functions using PSA API#2061

Open
bettio wants to merge 29 commits intoatomvm:mainfrom
bettio:more-crypto-functions
Open

WIP: add additional crypto functions using PSA API#2061
bettio wants to merge 29 commits intoatomvm:mainfrom
bettio:more-crypto-functions

Conversation

@bettio
Copy link
Collaborator

@bettio bettio commented Jan 16, 2026

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

@bettio bettio force-pushed the more-crypto-functions branch 7 times, most recently from 4c07de1 to bb3c1f7 Compare January 22, 2026 16:59
@bettio bettio force-pushed the more-crypto-functions branch 4 times, most recently from d7c73fc to 2bc6424 Compare January 28, 2026 12:07
@HeroesLament
Copy link

Hi @bettio I have made a commit here:

HeroesLament@4253eee

It adds EdDSA (Ed25519/Ed448) to nif_crypto_sign and nif_crypto_verify. The EdDSA path uses PSA_ALG_PURE_EDDSA and skips DER conversion since EdDSA signatures are fixed-size raw bytes (64 for Ed25519, 114 for Ed448).

erlangcrypto:sign(eddsa, none, Msg, [Priv, ed25519])
crypto:verify(eddsa, none, Msg, Sig, [Pub, ed25519])

Tests included in test_crypto_pk.erl.

@bettio bettio force-pushed the more-crypto-functions branch 4 times, most recently from 7c72497 to 97e2d91 Compare March 9, 2026 15:23
Signed-off-by: Davide Bettio <davide@uninstall.it>
@bettio bettio force-pushed the more-crypto-functions branch from 97e2d91 to a0d8a77 Compare March 9, 2026 16:30
bettio and others added 16 commits March 9, 2026 22:15
Signed-off-by: Davide Bettio <davide@uninstall.it>
Signed-off-by: Davide Bettio <davide@uninstall.it>
Signed-off-by: Davide Bettio <davide@uninstall.it>
fixup! WIP HASH

Include mbedtls/build_info.h or mbedtls/config.h in globalcontext.h
to ensure MBEDTLS_PSA_CRYPTO_C is consistently defined.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Davide Bettio <davide@uninstall.it>
@bettio bettio force-pushed the more-crypto-functions branch from 90160e7 to 4d70014 Compare March 9, 2026 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants