cryspen / libcrux Goto Github PK
View Code? Open in Web Editor NEWThe formally verified crypto library for Rust
Home Page: https://cryspen.com/libcrux
License: Apache License 2.0
The formally verified crypto library for Rust
Home Page: https://cryspen.com/libcrux
License: Apache License 2.0
The top level should probably expose something like this.
With all the warnings in here. We should make sure the top level APIs are done well and offer these different options, and then drop the functions here that are not necessary.
You can do that here, or file a follow-up.
Originally posted by @franziskuskiefer in #63 (comment)
In the macOS CI image, the command
cargo build --verbose --target aarch64-apple-darwin
sometimes, but not always, results in a whole bunch of warnings and error.
Functions such as simd128_support, simd256_support, etc. should do detection based on information obtained at runtime and not use build-time cfg
flags.
`libcrux_platform` checks for `avx` in simd128_support() besides `avx2` in simd256_support(), AFIAK both aren't supported in x86 32-bit processors but can be enabled with `-m32` mode on x64 targets
Originally posted by @mamonet in #73 (comment)
Also: #73 (comment)
Not all the code we have in libcrux is verified (e.g. SHA-2 and x25519 from libjade) and we may want to add other partially-verified code in the future. Our policy is that unverified code will never be exposed in the libcrux API. We may want to better document the status of various implementations in a STATUS.md file or something.
Update the CI
Platform support
Ergonomics & Maintainability
There are some CI improvements esp. for 32-bit in #21.
The uniform_sampler_mean_and_variance
and binomial_sampler_mean_and_variance
tests in sampling.rs
in the Kyber specification fail intermittently, perhaps due to an issue in the randomness provided by proptest
.
Update the build to
Some open ToDos on branch franziskus/hacl-sys
"=0.0.1"
)Platform support
Platform support for follow ups
There's a drafty version in #21.
Let's add a note to the readme that in order to build this the libclang path needs to be set correclty.
Originally posted by @franziskuskiefer in #57 (comment)
How much work would it be to sidestep evercrypt for AES GCM?
That's the only one that doesn't have a HACL API.
Originally posted by @franziskuskiefer in #63 (comment)
sample_from_uniform_distribution
to return early within the loop once that's better supported in haxMONTGOMERY_R
in montgomery_reduce
once hacspec/hax#332 is fixed.When Kyber is added in #17, add a Kyber HPKE ciphersuite as well as a hybrid ciphersuite (using https://datatracker.ietf.org/doc/html/draft-westerbaan-cfrg-hpke-xyber768d00).
Line 74 in b4d9411
make hardware feature detection complete and use it instead of the config flags
Add WASM compile target with HACL WASM code.
The following values are usually set in sys/hacl/config/config.h
. We need to set them depending on the platform we are building for.
TARGET_ARCHITECTURE
HACL_CAN_COMPILE_UINT128
HACL_CAN_COMPILE_VALE
LINUX_NO_EXPLICIT_BZERO
Once the code in the Kyber reference implementation starts to stabilize, document everything in it carefully.
We should test our implementations against the following:
linking fails right now
The kem
APIs currently use Vec<u8>
s for inputs and outputs. This, along with the fact that they allow for different algorithms to be selected, necessitates the use of unwrap()
s since the different algorithms have different length requirements that aren't being enforced at compile time.
Meta issue to track benchmarking.
The HPKE API is the (hac)spec API right now, which isn't great to use.
Add a high-level, usable API on top.
The crate::kem
module is currently written with only elliptic curves in mind (see for example impl From<Algorithm> for ecdh::Algorithm
here).
When Kyber is added, the From
implementation above will have to be changed to a TryFrom
, and so on.
Follow-up to #10
HACL code that uses allocations isn't working right now for some reason.
Use cc
for the libjade build.
Using it for hacl will be tackled when actually using it in #47 .
The signature API isn't great right now. It should be updated to be easier to use and cover all signature algorithms.
Do we need this error type or shall would it make more sense to pull this up into the main error type of libcrux?
This was necessary in the hazmat
case. But I think it might be nicer if we skip it here.
Originally posted by @franziskuskiefer in #63 (comment)
We should clean up the fuzzing code and make it more comprehensive. We could fuzz the Kyber code for a couple of minutes on each PR, and run a longer job where we fuzz the code for an hour or so every night.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.