Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
1ec625c
wasix compatability
dynamite-bud Jun 16, 2023
f34380c
wasix compatability
dynamite-bud Jun 18, 2023
dc99d9d
temp
dynamite-bud Jun 18, 2023
e93e48c
wasix compatability
dynamite-bud Jun 19, 2023
fdfb633
There is no target_os wasix, removed those references
john-sharratt Jul 11, 2023
f523c66
build cleanup
dynamite-bud Jul 20, 2023
4f08322
precompiled libs and removed wasix-libs folder
dynamite-bud Jul 20, 2023
fba500c
Merge pull request #1 from wasix-org/wasix-cleanup
dynamite-bud Jul 20, 2023
fa44cbf
Delete wasix_build.txt
dynamite-bud Jul 20, 2023
3ed8f31
add wasm targets to `cpu_intel.c`
dynamite-bud Aug 8, 2023
2ff2632
added cpu_intel.c target
dynamite-bud Aug 9, 2023
65ee9d9
file rename: `cpu-intel.c` → `cpu_intel.c`
dynamite-bud Aug 9, 2023
d6e9567
fix: builds for x86_64 targets
dynamite-bud Aug 9, 2023
5c3b66c
update: updated build script to match latest ring
dynamite-bud Aug 10, 2023
a33f0b8
chore: lineing up with latest ring with wasix compatibility
dynamite-bud Aug 10, 2023
06e85c7
checking base ring build
dynamite-bud Aug 10, 2023
86a81e3
chore: downgrade untrusted
dynamite-bud Aug 10, 2023
8c7482b
chore: links to core_dev instead of version
dynamite-bud Aug 10, 2023
e73b0a1
update: cpu_intel to cpu-intel
dynamite-bud Aug 10, 2023
a6d82ce
chore: update build and cargo files
dynamite-bud Aug 10, 2023
3df163f
Merge branch 'webc-ci-fix' of https://github.com/wasix-org/ring into …
dynamite-bud Aug 10, 2023
feb0ca6
included cpu.h in cpu-intel.c
dynamite-bud Aug 10, 2023
8e21caa
added more files for resolving openssl issues
dynamite-bud Aug 10, 2023
d35994f
chore: add getrandom to base deps
dynamite-bud Aug 10, 2023
8b62f1d
add once_cell fallback
dynamite-bud Aug 10, 2023
2f38e8d
chore: update perl file
dynamite-bud Aug 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
251 changes: 59 additions & 192 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,39 @@
[package]
authors = ["Brian Smith <brian@briansmith.org>", "Frank Denis <github@pureftpd.org>"]
authors = ["Brian Smith <brian@briansmith.org>"]
build = "build.rs"
categories = ["cryptography", "no-std"]
description = "Ring for wasm32-wasi"
documentation = "https://briansmith.org/rustdoc/ring/"
edition = "2018"
description = "Safe, fast, small crypto using Rust."
edition = "2021"
keywords = ["crypto", "cryptography", "rand", "ECC", "RSA"]
license-file = "LICENSE"
name = "ring-wasi"
name = "ring"
readme = "doc/link-to-readme.md"
repository = "https://github.com/jedisct1/ring-wasi"
version = "0.16.25"
repository = "https://github.com/briansmith/ring"

# Keep in sync with .github/workflows/ci.yml ("MSRV").
rust-version = "1.57"

# Keep in sync with `links` below.
version = "0.16.20"

# Prevent multiple versions of *ring* from being linked into the same program.
# Keep in sync with `version` above.
#
# "ring_core_" + version, replacing punctuation with underscores.
#
# build.rs uses this to derive the prefix for FFI symbols and the file names
# of the FFI libraries, so it must be a valid identifier prefix and a valid
# filename prefix.
links = "ring_core_dev"


include = [
"LICENSE",
"Cargo.toml",

"pregenerated/*",
"wasm-libs/*",

"benches/*.rs",
"build.rs",

"crypto/chacha/asm/chacha-armv4.pl",
Expand Down Expand Up @@ -54,6 +66,7 @@ include = [
"crypto/fipsmodule/bn/internal.h",
"crypto/fipsmodule/bn/montgomery.c",
"crypto/fipsmodule/bn/montgomery_inv.c",
"crypto/fipsmodule/ec/asm/p256-armv8-asm.pl",
"crypto/fipsmodule/ec/asm/p256-x86_64-asm.pl",
"crypto/fipsmodule/ec/ecp_nistz.c",
"crypto/fipsmodule/ec/ecp_nistz.h",
Expand All @@ -62,9 +75,9 @@ include = [
"crypto/fipsmodule/ec/gfp_p256.c",
"crypto/fipsmodule/ec/gfp_p384.c",
"crypto/fipsmodule/ec/p256.c",
"crypto/fipsmodule/ec/p256-x86_64-table.h",
"crypto/fipsmodule/ec/p256-x86_64.c",
"crypto/fipsmodule/ec/p256-x86_64.h",
"crypto/fipsmodule/ec/p256-nistz-table.h",
"crypto/fipsmodule/ec/p256-nistz.c",
"crypto/fipsmodule/ec/p256-nistz.h",
"crypto/fipsmodule/ec/p256_shared.h",
"crypto/fipsmodule/ec/p256_table.h",
"crypto/fipsmodule/ec/util.h",
Expand Down Expand Up @@ -93,193 +106,37 @@ include = [
"crypto/poly1305/poly1305_arm.c",
"crypto/poly1305/poly1305_arm_asm.S",
"crypto/poly1305/poly1305_vec.c",
"crypto/cipher_extra/asm/chacha20_poly1305_armv8.pl",
"crypto/cipher_extra/asm/chacha20_poly1305_x86_64.pl",
"doc/link-to-readme.md",
"examples/checkdigest.rs",
"examples/**/*.rs",
"include/ring-core/aes.h",
"include/ring-core/arm_arch.h",
"include/ring-core/base.h",
"include/ring-core/check.h",
"include/ring-core/cpu.h",
"include/ring-core/mem.h",
"include/ring-core/poly1305.h",
"include/ring-core/type_check.h",
"src/aead.rs",
"src/aead/aes.rs",
"src/aead/aes_gcm.rs",
"src/aead/aes_tests.txt",
"src/aead/block.rs",
"src/aead/chacha.rs",
"src/aead/chacha/fallback.rs",
"src/aead/chacha_tests.txt",
"src/aead/chacha20_poly1305.rs",
"src/aead/chacha20_poly1305_openssh.rs",
"src/aead/gcm.rs",
"src/aead/gcm/gcm_nohw.rs",
"src/aead/less_safe_key.rs",
"src/aead/nonce.rs",
"src/aead/opening_key.rs",
"src/aead/poly1305.rs",
"src/**/*.rs",
"src/aead/poly1305_test.txt",
"src/aead/quic.rs",
"src/aead/sealing_key.rs",
"src/aead/shift.rs",
"src/aead/unbound_key.rs",
"src/agreement.rs",
"src/arithmetic.rs",
"src/arithmetic/bigint.rs",
"src/arithmetic/bigint_elem_exp_consttime_tests.txt",
"src/arithmetic/bigint_elem_exp_vartime_tests.txt",
"src/arithmetic/bigint_elem_mul_tests.txt",
"src/arithmetic/bigint_elem_reduced_once_tests.txt",
"src/arithmetic/bigint_elem_reduced_tests.txt",
"src/arithmetic/bigint_elem_squared_tests.txt",
"src/arithmetic/constant.rs",
"src/arithmetic/montgomery.rs",
"src/array.rs",
"src/bits.rs",
"src/bssl.rs",
"src/c.rs",
"src/constant_time.rs",
"src/cpu.rs",
"src/data/alg-rsa-encryption.der",
"src/debug.rs",
"src/digest.rs",
"src/digest/sha1.rs",
"src/digest/sha2.rs",
"src/ec/curve25519/ed25519/digest.rs",
"src/ec/curve25519/ed25519.rs",
"src/ec/curve25519/ed25519/signing.rs",
"src/ec/curve25519/ed25519/verification.rs",
"src/ec/curve25519/ed25519/ed25519_pkcs8_v2_template.der",
"src/ec/curve25519.rs",
"src/ec/curve25519/ops.rs",
"src/ec/curve25519/scalar.rs",
"src/ec/curve25519/x25519.rs",
"src/ec.rs",
"src/ec/keys.rs",
"src/ec/suite_b/curve.rs",
"src/ec/suite_b/ecdh.rs",
"src/ec/suite_b/ecdsa/digest_scalar.rs",
"src/ec/suite_b/ecdsa.rs",
"src/ec/suite_b/ecdsa/signing.rs",
"src/ec/suite_b/ecdsa/verification.rs",
"src/ec/suite_b/ecdsa/ecdsa_digest_scalar_tests.txt",
"src/ec/suite_b/ecdsa/ecPublicKey_p256_pkcs8_v1_template.der",
"src/ec/suite_b/ecdsa/ecPublicKey_p384_pkcs8_v1_template.der",
"src/ec/suite_b/ecdsa/ecdsa_sign_asn1_tests.txt",
"src/ec/suite_b/ecdsa/ecdsa_sign_fixed_tests.txt",
"src/ec/suite_b.rs",
"src/ec/suite_b/ops/elem.rs",
"src/ec/suite_b/ops.rs",
"src/ec/suite_b/ops/p256.rs",
"src/ec/suite_b/ops/p256_elem_mul_tests.txt",
"src/ec/suite_b/ops/p256_elem_neg_tests.txt",
"src/ec/suite_b/ops/p256_elem_sum_tests.txt",
"src/ec/suite_b/ops/p256_point_double_tests.txt",
"src/ec/suite_b/ops/p256_point_mul_base_tests.txt",
"src/ec/suite_b/ops/p256_point_mul_serialized_tests.txt",
"src/ec/suite_b/ops/p256_point_mul_tests.txt",
"src/ec/suite_b/ops/p256_point_sum_mixed_tests.txt",
"src/ec/suite_b/ops/p256_point_sum_tests.txt",
"src/ec/suite_b/ops/p256_scalar_mul_tests.txt",
"src/ec/suite_b/ops/p256_scalar_square_tests.txt",
"src/ec/suite_b/ops/p384.rs",
"src/ec/suite_b/ops/p384_elem_div_by_2_tests.txt",
"src/ec/suite_b/ops/p384_elem_mul_tests.txt",
"src/ec/suite_b/ops/p384_elem_neg_tests.txt",
"src/ec/suite_b/ops/p384_elem_sum_tests.txt",
"src/ec/suite_b/ops/p384_point_double_tests.txt",
"src/ec/suite_b/ops/p384_point_mul_base_tests.txt",
"src/ec/suite_b/ops/p384_point_mul_tests.txt",
"src/ec/suite_b/ops/p384_point_sum_tests.txt",
"src/ec/suite_b/ops/p384_scalar_mul_tests.txt",
"src/ec/suite_b/private_key.rs",
"src/ec/suite_b/public_key.rs",
"src/ec/suite_b/suite_b_public_key_tests.txt",
"src/endian.rs",
"src/error.rs",
"src/hkdf.rs",
"src/hmac.rs",
"src/hmac_generate_serializable_tests.txt",
"src/io.rs",
"src/io/der.rs",
"src/io/der_writer.rs",
"src/io/positive.rs",
"src/io/writer.rs",
"src/lib.rs",
"src/limb.rs",
"src/endian.rs",
"src/pbkdf2.rs",
"src/pkcs8.rs",
"src/polyfill.rs",
"src/polyfill/array_map.rs",
"src/polyfill/chunks_fixed.rs",
"src/prefixed.rs",
"src/rand.rs",
"src/rsa/convert_nist_rsa_test_vectors.py",
"src/rsa.rs",
"src/rsa/padding.rs",
"src/rsa/random.rs",
"src/rsa/rsa_pss_padding_tests.txt",
"src/rsa/signature_rsa_example_private_key.der",
"src/rsa/signature_rsa_example_public_key.der",
"src/rsa/signing.rs",
"src/rsa/verification.rs",
"src/signature.rs",
"src/test.rs",
"src/test_1_syntax_error_tests.txt",
"src/test_1_tests.txt",
"src/test_3_tests.txt",
"tests/aead_aes_128_gcm_tests.txt",
"tests/aead_aes_256_gcm_tests.txt",
"tests/aead_chacha20_poly1305_tests.txt",
"tests/aead_chacha20_poly1305_openssh_tests.txt",
"tests/aead_tests.rs",
"tests/agreement_tests.rs",
"tests/agreement_tests.txt",
"tests/constant_time_tests.rs",
"tests/digest_tests.rs",
"tests/digest_tests.txt",
"tests/ecdsa_from_pkcs8_tests.txt",
"tests/ecdsa_tests.rs",
"tests/**/*.rs",
"tests/ecdsa_test_private_key_p256.p8",
"tests/ecdsa_test_public_key_p256.der",
"tests/ecdsa_test_public_key_p256_debug.txt",
"tests/ecdsa_sign_asn1_tests.txt",
"tests/ecdsa_sign_fixed_tests.txt",
"tests/ecdsa_verify_asn1_tests.txt",
"tests/ecdsa_verify_fixed_tests.txt",
"tests/ed25519_from_pkcs8_tests.txt",
"tests/ed25519_from_pkcs8_unchecked_tests.txt",
"tests/ed25519_tests.rs",
"tests/ed25519_tests.txt",
"tests/ed25519_test_private_key.bin",
"tests/ed25519_test_private_key.p8",
"tests/ed25519_test_public_key.bin",
"tests/ed25519_test_public_key.der",
"tests/hkdf_tests.rs",
"tests/hkdf_tests.txt",
"tests/hmac_tests.rs",
"tests/hmac_tests.txt",
"tests/pbkdf2_tests.rs",
"tests/pbkdf2_tests.txt",
"tests/quic_aes_128_tests.txt",
"tests/quic_aes_256_tests.txt",
"tests/quic_chacha20_tests.txt",
"tests/quic_tests.rs",
"tests/rand_tests.rs",
"tests/rsa_from_pkcs8_tests.txt",
"tests/rsa_pkcs1_sign_tests.txt",
"tests/rsa_pkcs1_verify_tests.txt",
"tests/rsa_primitive_verify_tests.txt",
"tests/rsa_pss_sign_tests.txt",
"tests/rsa_pss_verify_tests.txt",
"tests/rsa_tests.rs",
"tests/rsa_test_private_key_2048.p8",
"tests/rsa_test_public_key_2048.der",
"tests/rsa_test_public_key_2048_debug.txt",
"tests/signature_tests.rs",
"tests/rsa_test_public_modulus.bin",
"third_party/fiat/curve25519_32.h",
"third_party/fiat/curve25519_64.h",
"third_party/fiat/p256_32.h",
Expand Down Expand Up @@ -310,45 +167,50 @@ name = "ring"

[dependencies]
untrusted = { version = "0.7.1" }
getrandom = { version = "0.2.9" }

[target.'cfg(any(target_os = "wasi", target_os = "wasix"))'.dependencies]
getrandom = { version = "0.2.10" }
[target.'cfg(target_os = "wasi")'.dependencies]
getrandom = { version = "0.2.9" }
wasi = { version = "0.11.0" }

[target.'cfg(any(target_arch = "x86",target_arch = "x86_64", all(any(target_arch = "aarch64", target_arch = "arm"), any(target_os = "android", target_os = "fuchsia", target_os = "linux"))))'.dependencies]
spin = { version = "0.5.2", default-features = false }
[target.'cfg(any(target_arch = "x86",target_arch = "x86_64", all(any(target_arch = "aarch64", target_arch = "arm"), any(target_os = "android", target_os = "fuchsia", target_os = "linux", target_os = "windows"))))'.dependencies]
spin = { version = "0.9.2", default-features = false, features = ["once"] }

[target.'cfg(any(target_os = "android", target_os = "linux"))'.dependencies]
libc = { version = "0.2.84", default-features = false }
once_cell = { version = "1.5.2", default-features = false, features=["std"], optional = true }

[target.'cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "illumos", target_os = "netbsd", target_os = "openbsd", target_os = "solaris"))'.dependencies]
once_cell = { version = "1.5.2", default-features = false, features=["std"] }

[target.'cfg(all(target_arch = "wasm32", target_vendor = "unknown", target_os = "unknown", target_env = ""))'.dependencies]
web-sys = { version = "0.3.37", default-features = false, features = ["Crypto", "Window"] }

[target.'cfg(target_os = "windows")'.dependencies]
winapi = { version = "0.3.8", default-features = false, features = ["ntsecapi", "wtypesbase"] }
libc = { version = "0.2.100", default-features = false }
once_cell = { version = "1.5.2", default-features = false, features = [
"std",
], optional = true }

[target.'cfg(all(target_arch = "aarch64", target_os = "windows"))'.dependencies]
winapi = { version = "0.3.9", default-features = false, features = [
"ntsecapi",
"wtypesbase",
"processthreadsapi",
] }

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = { version = "0.3.18", default-features = false }
wasm-bindgen-test = { version = "0.3.26", default-features = false }

[target.'cfg(any(unix, windows))'.dev-dependencies]
libc = { version = "0.2.84", default-features = false }
libc = { version = "0.2.100", default-features = false }


# Keep this in sync with `[dependencies]` in pregenerate_asm/Cargo.toml.
[build-dependencies]
cc = { version = "1.0.66", default-features = false }
cc = { version = "1.0.69", default-features = false }

[dev-dependencies]
criterion = { version = "0.4", default-features = false }

[features]
# These features are documented in the top-level module's documentation.
default = ["alloc", "dev_urandom_fallback", "wasm32_c"]
alloc = []
dev_urandom_fallback = ["once_cell"]
internal_benches = []
slow_tests = []
std = ["alloc"]
test_logging = []
wasm32_unknown_unknown_js = ["getrandom/js"]
wasm32_c = []

# XXX: debug = false because of https://github.com/rust-lang/rust/issues/34122
Expand All @@ -368,3 +230,8 @@ rpath = false
lto = true
debug-assertions = false
codegen-units = 1


[[bench]]
name = "aead"
harness = false
Loading