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.
Files changed (38) hide show
  1. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/Cargo.lock +1 -1
  2. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/Cargo.toml +1 -1
  3. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/PKG-INFO +1 -1
  4. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/README.md +1 -1
  5. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/src/pqxdh.rs +3 -1
  6. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/.cargo/config.toml +0 -0
  7. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/.github/workflows/go.yml +0 -0
  8. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/.github/workflows/python.yml +0 -0
  9. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/.github/workflows/release.yml +0 -0
  10. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/.github/workflows/rust.yml +0 -0
  11. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/.gitignore +0 -0
  12. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/LICENSE +0 -0
  13. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/beaconcrypt.go +0 -0
  14. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/beaconcrypt_test.go +0 -0
  15. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/bindings.h +0 -0
  16. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/build.rs +0 -0
  17. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/clippy.toml +0 -0
  18. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/doc/protocol.md +0 -0
  19. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/doc/rationale.md +0 -0
  20. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/doc/threat_model.md +0 -0
  21. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/go.mod +0 -0
  22. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/pyproject.toml +0 -0
  23. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/rustfmt.toml +0 -0
  24. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/src/beacon.rs +0 -0
  25. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/src/cnsa2.rs +0 -0
  26. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/src/error.rs +0 -0
  27. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/src/lib.rs +0 -0
  28. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/src/schema/cryptoframe.capnp +0 -0
  29. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/src/schema/phase1.capnp +0 -0
  30. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/src/schema/phase2.capnp +0 -0
  31. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/src/schema/protogram.capnp +0 -0
  32. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/src/server.rs +0 -0
  33. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/src/shared.rs +0 -0
  34. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/tests/beacon.rs +0 -0
  35. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/tests/server.rs +0 -0
  36. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/tests/test_encryption.py +0 -0
  37. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/tests/test_registration.py +0 -0
  38. {beaconcrypt-0.3.1 → beaconcrypt-0.3.2}/uv.lock +0 -0
@@ -84,7 +84,7 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
84
84
 
85
85
  [[package]]
86
86
  name = "beaconcrypt"
87
- version = "0.3.1"
87
+ version = "0.3.2"
88
88
  dependencies = [
89
89
  "capnp",
90
90
  "capnpc",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "beaconcrypt"
3
- version = "0.3.1"
3
+ version = "0.3.2"
4
4
  edition = "2024"
5
5
  license-file = "LICENSE"
6
6
  readme = "README.md"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: beaconcrypt
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -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