anza-ed25519-verified/verification/CurveField.llbc

1 line
6.6 MiB
Text
Raw Normal View History

THE SIGNATURE APEX on the anza fork: verify_accepts_iff, button-enforced FOURTH AND FINAL PYRAMID CAPPED - the signature layer is complete on all four ed25519 forks. anza's verify code lives in the same crate as the curve (solana-ed25519), so the whole verify path joins the merged CurveField extraction directly: one universe, no glue layer, no FQ-name welding, and the Error enum plus the parse/filter helpers are all real extracted code. - extract.sh: verify_sha512 start-from joins the merged stanza; sha512_hash3 and the foreign ed25519 crate opaque; RUSTFLAGS --cfg curve25519_serial_only pins the serial backend so get_selected_backend extracts as the real constant Serial (the stale dispatch axiom is deleted from FunsExternal). - gen/CurveField externals: real defs for the ?-operator plumbing (Try::branch, FromResidual) and faithful identity models for Choice::unwrap_u8 (transparent-u8 body: self.0) and the RangeFull get_unchecked[_mut] raw-pointer pair (Rust body returns the pointer unchanged) - the three would-be cone intruders, eliminated. - Proofs/SigApexSpec.lean: verify_loop_full (standard three-axiom cone) and verify_accepts_iff - the verifier accepts IFF the recomputed compress([k](-A) + [s]B) equals the signature's R byte-for-byte, with the ZIP-215 legacy filters and the s < l parse conditioned by hypotheses, mirroring the siblings' hparse. - check.sh Phase 3b enforces the apex cone to be EXACTLY [propext, Classical.choice, Quot.sound, ed25519.Signature, ed_sigs.sha512_hash3, ed25519.Signature.r_bytes, ed25519.Signature.s_bytes] - the tightest boundary of the four pyramids: the SHA-512 oracle plus the foreign wire-format type and its two byte accessors, nothing else. check.sh (incl. Phase 3b) + check-scalar.sh both green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 21:48:08 +00:00
{"charon_version":"0.1.212","translated":{"crate_name":"curve25519","options":{"ullbc":false,"precise_drops":false,"skip_borrowck":false,"mir":null,"rustc_args":[],"targets":[],"monomorphize":false,"monomorphize_mut":null,"start_from":["crate::field","crate::backend::serial::u64::field","crate::backend::serial::curve_models","crate::edwards","crate::backend::serial::u64::scalar::_::add","crate::backend::serial::u64::scalar::_::sub","crate::backend::serial::u64::scalar::_::mul","crate::backend::serial::u64::scalar::_::square","crate::backend::serial::u64::scalar::_::montgomery_mul","crate::backend::serial::u64::scalar::_::montgomery_square","crate::backend::serial::u64::scalar::_::montgomery_reduce","crate::backend::serial::u64::scalar::_::montgomery_invert","crate::backend::serial::u64::scalar::_::as_montgomery","crate::backend::serial::u64::scalar::_::from_montgomery","crate::backend::serial::u64::scalar::_::from_bytes_wide","crate::scalar::_::from_bytes_mod_order","crate::scalar::_::from_bytes_mod_order_wide","crate::ed_sigs::verification_key::_::verify_sha512"],"start_from_if_exists":[],"start_from_attribute":null,"start_from_pub":false,"include":[],"opaque":["crate::ed_sigs::sha512_hash3","ed25519","crate::field::_::internal_invert_batch","crate::backend::serial::scalar_mul::variable_base","crate::backend::serial::scalar_mul::vartime_triple_base","crate::scalar::_::non_adjacent_form_128","crate::backend::serial::scalar_mul::straus","crate::backend::serial::scalar_mul::precomputed_straus","crate::backend::serial::scalar_mul::pippenger","crate::backend::vector","crate::backend::scalar_fits_in_128_bits","crate::edwards::decompress","crate::edwards::_::sum","crate::edwards::_::from_slice"],"exclude":[],"extract_opaque_bodies":false,"translate_all_methods":false,"duplicate_defaulted_methods":true,"lift_associated_types":["*"],"hide_marker_traits":true,"remove_adt_clauses":true,"hide_allocator":true,"remove_unused_self_clauses":true,"desugar_drops":false,"ops_to_function_calls":true,"index_to_function_calls":true,"treat_box_as_builtin":true,"raw_consts":false,"unsized_strings":false,"reconstruct_fallible_operations":true,"reconstruct_asserts":true,"unbind_item_vars":true,"print_original_ullbc":false,"print_ullbc":false,"print_built_llbc":false,"print_llbc":false,"dest_dir":null,"dest_file":"/home/oho/GitClone/Claude/FormalVerification/anza-ed25519-verified/verification/CurveField.llbc","no_dedup_serialized_ast":false,"format":null,"no_serialize":false,"no_typecheck":false,"no_normalize":false,"abort_on_error":false,"error_on_warnings":false,"preset":"Aeneas"},"target_information":[{"key":"x86_64-unknown-linux-gnu","value":{"target_pointer_size":8,"is_little_endian":true}}],"files":[{"id":0,"name":{"Local":"curve25519/solana-ed25519/src/backend/serial/u64/scalar.rs"},"crate_name":"curve25519","contents":"//! Arithmetic mod \\\\(2\\^{252} + 27742317777372353535851937790883648493\\\\)\n//! with five \\\\(52\\\\)-bit unsigned limbs.\n//!\n//! \\\\(51\\\\)-bit limbs would cover the desired bit range (\\\\(253\\\\)\n//! bits), but isn't large enough to reduce a \\\\(512\\\\)-bit number with\n//! Montgomery multiplication, so \\\\(52\\\\) bits is used instead. To see\n//! that this is safe for intermediate results, note that the largest\n//! limb in a \\\\(5\\times 5\\\\) product of \\\\(52\\\\)-bit limbs will be\n//!\n//! ```text\n//! (0xfffffffffffff^2) * 5 = 0x4ffffffffffff60000000000005 (107 bits).\n//! ```\n\nuse core::fmt::Debug;\nuse core::ops::{Index, IndexMut};\nuse subtle::{Choice, ConditionallySelectable};\n\n#[cfg(feature = \"zeroize\")]\nuse zeroize::{DefaultIsZeroes, Zeroize};\n\nuse crate::constants;\n\n/// The `Scalar52` struct represents an element in\n/// \\\\(\\mathbb Z / \\ell \\mathbb Z\\\\) as 5 \\\\(52\\\\)-bit limbs.\n#[derive(Copy, Clone, Default)]\npub struct Scalar52(pub [u64; 5]);\n\nimpl Debug for Scalar52 {\n fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {\n f.write_str(\"Scalar52{..}\")\n }\n}\n\n#[cfg(feature = \"zeroize\")]\nimpl DefaultIsZeroes for Scalar52 {