mirror of
https://github.com/saymrwulf/anza-ed25519-verified.git
synced 2026-09-03 20:13:46 +00:00
Merged gen: one CurveField universe (field + curve + scalar), both buttons green
Same architecture as the dalek/risc0/betrusted forks: the Scalar52 arithmetic start-froms (11 fns) plus scalar::from_bytes_mod_order[_wide] join the CurveField extraction, so the field, curve, and scalar layers share a single type universe - the prerequisite for the signature apex, whose verify glue must see curve AND scalar calls resolve to proven definitions by fully-qualified name. Proofs/ScalarDenote.lean flips its import CurveScalar.Funs -> CurveField.Funs (one line; the whole scalar proof chain recompiles unchanged on the merged gen). check-scalar.sh repoints its GEN list. gen/CurveScalar retained until the deprecation pass, as on the siblings. check.sh + check-scalar.sh both green, all certificates axiom-clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
4c331378fc
commit
1841aa8b81
6 changed files with 1121 additions and 4 deletions
File diff suppressed because one or more lines are too long
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
Imports: gen/CurveScalar (the transpiled Scalar52 arithmetic).
|
||||
────────────────────────────────────────────────────────────────────────────── -/
|
||||
import CurveScalar.Funs
|
||||
import CurveField.Funs
|
||||
open Aeneas Aeneas.Std Result
|
||||
open curve25519
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ set -uo pipefail
|
|||
source ~/aeneas-toolchain/env.sh
|
||||
HERE="$(cd "$(dirname "$0")" && pwd)"
|
||||
AENEAS_LEAN="$AENEAS_HOME/backends/lean"
|
||||
GEN=(CurveScalar/TypesExternal CurveScalar/Types CurveScalar/FunsExternal CurveScalar/Funs)
|
||||
GEN=(CurveField/TypesExternal CurveField/Types CurveField/FunsExternal CurveField/Funs)
|
||||
PROOFS=(ScalarDenote ScalarLoop ScalarSubSpec ScalarAddSpec ScalarMulSpec ScalarMontSpec ScalarReduceSpec ScalarFullMulSpec ScalarMain ScalarWideSpec ScalarBytesSpec ScalarUnpackSpec ScalarFromBytesSpec)
|
||||
|
||||
echo "=== stub/axiom audit ==="
|
||||
|
|
|
|||
|
|
@ -23,13 +23,26 @@ source ~/aeneas-toolchain/env.sh
|
|||
HERE="$(cd "$(dirname "$0")" && pwd)"
|
||||
CRATE=~/GitClone/FormalVerification/sources/anza-cryptography-source/curve25519/solana-ed25519
|
||||
|
||||
echo "[1/2] charon: Rust -> LLBC (field + curve_models + edwards)"
|
||||
echo "[1/2] charon: Rust -> LLBC (field + curve_models + edwards + scalar [MERGED GEN])"
|
||||
cd "$CRATE"
|
||||
charon cargo --preset=aeneas \
|
||||
--start-from crate::field \
|
||||
--start-from crate::backend::serial::u64::field \
|
||||
--start-from crate::backend::serial::curve_models \
|
||||
--start-from crate::edwards \
|
||||
--start-from 'crate::backend::serial::u64::scalar::_::add' \
|
||||
--start-from 'crate::backend::serial::u64::scalar::_::sub' \
|
||||
--start-from 'crate::backend::serial::u64::scalar::_::mul' \
|
||||
--start-from 'crate::backend::serial::u64::scalar::_::square' \
|
||||
--start-from 'crate::backend::serial::u64::scalar::_::montgomery_mul' \
|
||||
--start-from 'crate::backend::serial::u64::scalar::_::montgomery_square' \
|
||||
--start-from 'crate::backend::serial::u64::scalar::_::montgomery_reduce' \
|
||||
--start-from 'crate::backend::serial::u64::scalar::_::montgomery_invert' \
|
||||
--start-from 'crate::backend::serial::u64::scalar::_::as_montgomery' \
|
||||
--start-from 'crate::backend::serial::u64::scalar::_::from_montgomery' \
|
||||
--start-from 'crate::backend::serial::u64::scalar::_::from_bytes_wide' \
|
||||
--start-from 'crate::scalar::_::from_bytes_mod_order' \
|
||||
--start-from 'crate::scalar::_::from_bytes_mod_order_wide' \
|
||||
--opaque 'crate::field::_::internal_invert_batch' \
|
||||
--opaque 'crate::backend::serial::scalar_mul::variable_base' \
|
||||
--opaque 'crate::backend::serial::scalar_mul::vartime_triple_base' \
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -180,6 +180,12 @@ structure scalar.Scalar where
|
|||
@[reducible]
|
||||
def window.NafLookupTable5 (T : Type) := Array T 8#usize
|
||||
|
||||
/-- [curve25519::backend::serial::u64::scalar::Scalar52]
|
||||
Source: 'curve25519/solana-ed25519/src/backend/serial/u64/scalar.rs', lines 26:0-26:34
|
||||
Visibility: public -/
|
||||
@[reducible]
|
||||
def backend.serial.u64.scalar.Scalar52 := Array Std.U64 5#usize
|
||||
|
||||
/-- [curve25519::backend::BackendKind]
|
||||
Source: 'curve25519/solana-ed25519/src/backend.rs', lines 46:0-50:1 -/
|
||||
@[discriminant isize]
|
||||
|
|
|
|||
Loading…
Reference in a new issue