beaconcrypt 0.3.1__tar.gz → 0.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/Cargo.lock +1 -1
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/Cargo.toml +1 -1
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/PKG-INFO +1 -1
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/README.md +1 -1
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/src/pqxdh.rs +3 -1
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/.cargo/config.toml +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/.github/workflows/go.yml +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/.github/workflows/python.yml +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/.github/workflows/release.yml +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/.github/workflows/rust.yml +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/.gitignore +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/LICENSE +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/beaconcrypt.go +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/beaconcrypt_test.go +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/bindings.h +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/build.rs +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/clippy.toml +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/doc/protocol.md +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/doc/rationale.md +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/doc/threat_model.md +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/go.mod +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/pyproject.toml +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/rustfmt.toml +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/src/beacon.rs +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/src/cnsa2.rs +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/src/error.rs +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/src/lib.rs +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/src/schema/cryptoframe.capnp +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/src/schema/phase1.capnp +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/src/schema/phase2.capnp +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/src/schema/protogram.capnp +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/src/server.rs +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/src/shared.rs +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/tests/beacon.rs +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/tests/server.rs +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/tests/test_encryption.py +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/tests/test_registration.py +0 -0
- {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/uv.lock +0 -0
|
@@ -57,7 +57,7 @@ The reference implementation has two profiles: `PQXDH` and `CNSA2`. Profiles are
|
|
|
57
57
|
## Usage
|
|
58
58
|
The reference implementation is a library that can currently be used either from rust or through C FFI. The C interface is currently not tested.
|
|
59
59
|
|
|
60
|
-
From rust, usage is mostly just instanciating `CryptoProvider` objects. When using the C FFI, the library creates a global `CryptoProvider` object, whose methods are wrapped by the various functions in the interface.
|
|
60
|
+
From rust, usage is mostly just instanciating `CryptoProvider` objects. When using the C FFI, the library creates a global `CryptoProvider` object, whose methods are wrapped by the various functions in the interface. Look at tests for examples.
|
|
61
61
|
|
|
62
62
|
# Copyright
|
|
63
63
|
This work is dedicated to the public domain.
|
|
@@ -331,6 +331,9 @@ impl ProviderBeacon for BeaconCryptPqxdh {
|
|
|
331
331
|
crypto_kx::PublicKey::from_bytes(response.get_ephemeral_key().ok()?).ok()?;
|
|
332
332
|
let server_id =
|
|
333
333
|
crypto_sign::PublicKey::from_bytes(response.get_identity_key().ok()?).ok()?;
|
|
334
|
+
if server_id != self.server_id()?.clone() {
|
|
335
|
+
return None;
|
|
336
|
+
}
|
|
334
337
|
let server_kex_id = crypto_sign::ed25519_pk_to_curve25519(&server_id).ok()?;
|
|
335
338
|
let beacon_kex_id = crypto_sign::ed25519_sk_to_curve25519(self.identity_sk()).ok()?;
|
|
336
339
|
let shared_secret =
|
|
@@ -353,7 +356,6 @@ impl ProviderBeacon for BeaconCryptPqxdh {
|
|
|
353
356
|
let derived_secret = derive_root_key(dh1, dh2, dh3, dh4, shared_secret).ok()?;
|
|
354
357
|
self.delete_onetime_keypair();
|
|
355
358
|
|
|
356
|
-
self.add_server_pk(server_id.clone());
|
|
357
359
|
self.set_identity_kid(response.get_key_id());
|
|
358
360
|
let id = self.identity_pk().clone();
|
|
359
361
|
self.set_associated_data(build_additional_data(server_id, id));
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|