mirror of
https://github.com/saymrwulf/dalek-ed25519-verified.git
synced 2026-09-04 20:24:12 +00:00
extract.sh: reproducible end-to-end (CurveField merged gen + CurveSig glue)
The verify-glue extraction (charon on the vendored ed25519-dalek with the SHA-512/wire-format opaque boundary) is now stanza [3/4]-[4/4] of the one extraction script, not an ad-hoc step. Regenerated artifacts identical. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
47114702e0
commit
af5b3f53de
2 changed files with 25 additions and 2 deletions
1
verification/CurveSig.llbc
Normal file
1
verification/CurveSig.llbc
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -23,7 +23,7 @@ source ~/aeneas-toolchain/env.sh
|
|||
HERE="$(cd "$(dirname "$0")" && pwd)"
|
||||
CRATE=~/GitClone/FormalVerification/sources/curve25519-dalek-source/curve25519-dalek
|
||||
|
||||
echo "[1/2] charon: Rust -> LLBC (field + curve_models + edwards + scalar [MERGED GEN])"
|
||||
echo "[1/4] charon: Rust -> LLBC (field + curve_models + edwards + scalar [MERGED GEN])"
|
||||
cd "$CRATE"
|
||||
# Force the portable SERIAL backend (the one we verify): the SIMD dispatch
|
||||
# arm is `#[cfg(curve25519_dalek_backend = "simd")]`, so pinning the cfg to
|
||||
|
|
@ -60,8 +60,30 @@ charon cargo --preset=aeneas \
|
|||
--dest-file "$HERE/CurveField.llbc" \
|
||||
-- --no-default-features
|
||||
|
||||
echo "[2/2] aeneas: LLBC -> Lean (split files, CurveField.* modules)"
|
||||
echo "[2/4] aeneas: LLBC -> Lean (split files, CurveField.* modules)"
|
||||
cd "$HERE"
|
||||
aeneas -backend lean -split-files -subdir CurveField -dest gen CurveField.llbc
|
||||
|
||||
echo "[3/4] charon: ed25519-dalek verify glue -> LLBC (SHA-512 opaque)"
|
||||
SIGCRATE="$(dirname "$CRATE")/ed25519-dalek"
|
||||
cd "$SIGCRATE"
|
||||
charon cargo --preset=aeneas \
|
||||
--start-from 'crate::verifying::verify_sha512' \
|
||||
--start-from 'crate::verifying::recompute_r_sha512' \
|
||||
--opaque 'crate::verifying::sha512_new' \
|
||||
--opaque 'crate::verifying::sha512_update' \
|
||||
--opaque 'crate::verifying::sha512_finalize_bytes' \
|
||||
--opaque 'crate::signature::compressed_from_bytes' \
|
||||
--opaque 'curve25519_dalek' \
|
||||
--opaque 'sha2' --opaque 'digest' --opaque 'ed25519' \
|
||||
--opaque 'signature' --opaque 'subtle' --opaque 'zeroize' \
|
||||
--exclude 'hybrid_array' --exclude 'typenum' \
|
||||
--hide-marker-traits \
|
||||
--dest-file "$HERE/CurveSig.llbc"
|
||||
|
||||
echo "[4/4] aeneas: LLBC -> Lean (CurveSig.* modules; hand-maintained"
|
||||
echo " TypesExternal.lean / FunsExternal.lean are NOT overwritten)"
|
||||
cd "$HERE"
|
||||
aeneas -backend lean -split-files -subdir CurveSig -dest gen CurveSig.llbc
|
||||
|
||||
echo "Done. Now run ./check.sh to type-check the regenerated model."
|
||||
|
|
|
|||
Loading…
Reference in a new issue