Skip to content
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

ed448 poc #119

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

ed448 poc #119

wants to merge 1 commit into from

Conversation

jasoncolburne
Copy link
Collaborator

@jasoncolburne jasoncolburne commented Mar 6, 2023

The crate is marked specifically as not suitable for production, but I wanted to see if things would work. I found issues with the Sizage tables.

The problems occured due to the representation of a compressed point as 57 octets, where the codes for Ed448_Seed and X448 only allow for exactly 448 bits (56 octets). I suppose we could try to avoid encoding the sign but the spec says to use 57 bytes:

https://www.rfc-editor.org/rfc/rfc8032

See Section 5.2.6, for an example.

76 b64 chars - 1 code char = 75 b64 chars * 3 octets / 4 b64 chars = 56.25 octets. We also can't (not that we should) abuse that 0.25 because padding checks will explode.

The other codes for public keys were correct in length, with fs == 80 and a 4 char code, leaving 76 b64 chars = 57 octets.

Incorrect, however, was the Matter/Cigar signature length which was indicated to be fs == 56, when in reality 156 is the correct value for a 4 char code (152 b64 chars = 114 octets).

@codecov
Copy link

codecov bot commented Mar 6, 2023

Codecov Report

Merging #119 (70a8516) into main (f00a844) will decrease coverage by 0.39%.
The diff coverage is 71.11%.

@@            Coverage Diff             @@
##             main     #119      +/-   ##
==========================================
- Coverage   94.88%   94.50%   -0.39%     
==========================================
  Files          29       29              
  Lines        2778     2820      +42     
==========================================
+ Hits         2636     2665      +29     
- Misses        142      155      +13     
Impacted Files Coverage Δ
src/core/cigar.rs 97.36% <ø> (ø)
src/core/verfer.rs 100.00% <ø> (ø)
src/core/signer.rs 87.75% <28.57%> (-4.56%) ⬇️
src/crypto/sign.rs 90.69% <77.14%> (-9.31%) ⬇️
src/core/matter/tables.rs 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant