Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Problem: no way for mls member to prove invalid ciphertext (fixes #1797) #2029

Merged
merged 1 commit into from
Jul 30, 2020

Conversation

tomtau
Copy link
Contributor

@tomtau tomtau commented Jul 27, 2020

Solution: sketched out core of "NACK" mechanism
which involves revealing shared secrets from invalid
message parts and including DLEQ proofs.

-- currently, needs:

  1. latest master of p256 which contains scalar arithmetic (not yet released)
  2. for the high-level API, it needs to directly decrypt HPKE ciphertext
    from a shared secret -- this may not ever be released

also needs "verify_node_private_key" from #2018

@tomtau
Copy link
Contributor Author

tomtau commented Jul 27, 2020

this is based on the previous PR #1805 that was opened for some time as a draft for review which @samngmco had a quick look at

@@ -127,6 +127,10 @@ impl HPKEPrivateKey {
)
}

pub fn marshal_arr_unsafe(&self) -> [u8; 32] {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's arr?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

array

@tomtau
Copy link
Contributor Author

tomtau commented Jul 27, 2020

also, had to change some types / panicing-behavior in tree / commit processing, otherwise it won't be possible to test this.
there's this issue for that #1784

Copy link
Collaborator

@leejw51crypto leejw51crypto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@codecov
Copy link

codecov bot commented Jul 27, 2020

Codecov Report

Merging #2029 into master will increase coverage by 0.27%.
The diff coverage is 88.85%.

@@            Coverage Diff             @@
##           master    #2029      +/-   ##
==========================================
+ Coverage   65.01%   65.28%   +0.27%     
==========================================
  Files         211      213       +2     
  Lines       26728    27040     +312     
==========================================
+ Hits        17376    17653     +277     
- Misses       9352     9387      +35     
Impacted Files Coverage Δ
chain-tx-enclave-next/mls/src/extras/mod.rs 76.61% <76.61%> (ø)
chain-tx-enclave-next/mls/src/message.rs 67.91% <80.00%> (+0.17%) ⬆️
chain-tx-enclave-next/mls/src/extras/dleq.rs 97.12% <97.12%> (ø)
chain-tx-enclave-next/mls/src/group.rs 84.22% <100.00%> (+0.12%) ⬆️
chain-tx-enclave-next/mls/src/key.rs 72.28% <100.00%> (+1.03%) ⬆️
chain-tx-enclave-next/mls/src/tree.rs 79.25% <100.00%> (ø)

…pto-com#1797)

Solution: sketched out core of "NACK" mechanism
which involves revealing shared secrets from invalid
message parts and including DLEQ proofs.

-- currently, needs:
1) latest master of p256 which contains scalar arithmetic (not yet released)
2) for the high-level API, it needs to directly decrypt HPKE ciphertext
from a shared secret -- this may not ever be released
@tomtau
Copy link
Contributor Author

tomtau commented Jul 30, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented Jul 30, 2020

Build succeeded:

@bors bors bot merged commit 969f4d1 into crypto-com:master Jul 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants