-
Notifications
You must be signed in to change notification settings - Fork 480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Well known defaults for curve25519_dalek_bits
#456
Comments
As discussed in dalek-cryptography#456 this sets well known defaults for cfg(target_family = "wasm") and cfg(target_arch = "arm") for 64 bit arithmetric via cfg(curve25519_dalek_bits = "64")
As discussed in dalek-cryptography#456 this sets well known defaults for cfg(target_family = "wasm") and cfg(target_arch = "arm") for 64 bit arithmetric via cfg(curve25519_dalek_bits = "64")
As discussed in dalek-cryptography#456 this sets well known defaults for cfg(target_family = "wasm") and cfg(target_arch = "arm") for 64 bit arithmetric via cfg(curve25519_dalek_bits = "64")
As discussed in dalek-cryptography#456 this sets well known defaults for cfg(target_family = "wasm") and cfg(target_arch = "arm") for 64 bit arithmetric via cfg(curve25519_dalek_bits = "64")
Related: we also need a README update to reflect the new backend selection stuff |
As discussed in dalek-cryptography#456 this sets well known defaults for cfg(target_family = "wasm") and cfg(target_arch = "arm") for 64 bit arithmetric via cfg(curve25519_dalek_bits = "64")
Yeah doing that now 👍 |
As discussed in dalek-cryptography#456 this sets well known defaults for cfg(target_family = "wasm") and cfg(target_arch = "arm") for 64 bit arithmetric via cfg(curve25519_dalek_bits = "64")
As discussed in dalek-cryptography#456 this sets well known defaults for cfg(target_family = "wasm") and cfg(target_arch = "arm") for 64 bit arithmetric via cfg(curve25519_dalek_bits = "64")
As discussed in dalek-cryptography#456 this sets well known defaults for cfg(target_family = "wasm") and cfg(target_arch = "arm") for 64 bit arithmetric via cfg(curve25519_dalek_bits = "64")
build.rs was using cfg(target) but it has to evaluate this from env TARGET as build.rs cfg(target) in build context is the builder host and not the target. This change fixes curve25519_dalek_bits lottery to determine the correct automatic curve25119_dalek_bits with the help of platforms crate. As discussed in dalek-cryptography#456 this also prepares for well known defaults for wasm and arm serial backend via cfg(curve25519_dalek_bits = "64") If the wasm32 or armv7 are going to be u64 serial by default these will be followed up on later.
build.rs was using cfg(target) but it has to evaluate this from env TARGET as build.rs cfg(target) in build context is the builder host and not the target. This change fixes curve25519_dalek_bits lottery to determine the correct automatic curve25119_dalek_bits with the help of platforms crate. As discussed in dalek-cryptography#456 this also prepares for well known defaults for wasm and arm serial backend via cfg(curve25519_dalek_bits = "64") If the wasm32 or armv7 are going to be u64 serial by default these will be followed up on later.
build.rs was using cfg(target) but it has to evaluate this from env TARGET as build.rs cfg(target) in build context is the builder host and not the target. This change fixes curve25519_dalek_bits lottery to determine the correct automatic curve25119_dalek_bits with the help of platforms crate. As discussed in dalek-cryptography#456 this also prepares for well known defaults for wasm and arm serial backend via cfg(curve25519_dalek_bits = "64") If the wasm32 or armv7 are going to be u64 serial by default these will be followed up on later.
build.rs was using cfg(target) but it has to evaluate this from env TARGET as build.rs cfg(target) in build context is the builder host and not the target. This change fixes curve25519_dalek_bits lottery to determine the correct automatic curve25119_dalek_bits with the help of platforms crate. As discussed in dalek-cryptography#456 this also prepares for well known defaults for wasm and arm serial backend via cfg(curve25519_dalek_bits = "64") If the wasm32 or armv7 are going to be u64 serial by default these will be followed up on later.
build.rs was using cfg(target) but it has to evaluate this from env TARGET as build.rs cfg(target) in build context is the builder host and not the target. This change fixes curve25519_dalek_bits lottery to determine the correct automatic curve25119_dalek_bits with the help of platforms crate. As discussed in dalek-cryptography#456 this also prepares for well known defaults for wasm and arm serial backend via cfg(curve25519_dalek_bits = "64") If the wasm32 or armv7 are going to be u64 serial by default these will be followed up on later.
build.rs was using cfg(target) but it has to evaluate this from env TARGET as build.rs cfg(target) in build context is the builder host and not the target. This change fixes curve25519_dalek_bits lottery to determine the correct automatic curve25119_dalek_bits with the help of platforms crate. As discussed in dalek-cryptography#456 this also prepares for well known defaults for wasm and arm serial backend via cfg(curve25519_dalek_bits = "64") If the wasm32 or armv7 are going to be u64 serial by default these will be followed up on later.
build.rs was using cfg(target) but it has to evaluate this from env TARGET as build.rs cfg(target) in build context is the builder host and not the target. This change fixes curve25519_dalek_bits lottery to determine the correct automatic curve25119_dalek_bits with the help of platforms crate. As discussed in dalek-cryptography#456 this also prepares for well known defaults for wasm and arm serial backend via cfg(curve25519_dalek_bits = "64") If the wasm32 or armv7 are going to be u64 serial by default these will be followed up on later.
build.rs was using cfg(target) but it has to evaluate this from env TARGET as build.rs cfg(target) in build context is the builder host and not the target. This change fixes curve25519_dalek_bits lottery to determine the correct automatic curve25119_dalek_bits with the help of platforms crate. As discussed in #456 this also prepares for well known defaults for wasm and arm serial backend via cfg(curve25519_dalek_bits = "64") If the wasm32 or armv7 are going to be u64 serial by default these will be followed up on later.
For the record we have re-tested 32-bit Android execution speed with the final 4.0 release and found the following results:
So in conclusion, there's not going to be a perfect choice for all ARMv7 Android devices, but we've seen more success with the u64 backend than the u32 one, and we'll probably continue using it (it was the default in 3.x as well). |
Origin issue:
Our MVP became the "override" between
[fiat_]u32
and[fiat_]u64
regardless ofcfg(target_pointer_width)
We implemented the MVP here:
Where the default is based on
cfg(target_pointer_width)
:[fiat_]u32
on 32 bit targets[fiat_]u64
on 64 bit targets[fiat_]u32
on all other@tarcieri raised to provide well known "target defaults" e.g. arm, wasm etc. : #449 (comment), #454 (comment)
This would be (https://doc.rust-lang.org/reference/conditional-compilation.html):
cfg(target_family = "wasm")
->[fiat_]u64
cfg(target_arch = "armv7")
->[fiat_]u64
Could we perhaps discuss / gather a list proper for MVP for this and then can perhaps throw PR at this ?
The text was updated successfully, but these errors were encountered: