This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 133
Testing Boneh Franklin IBE on BN curve #4
Open
Geal
wants to merge
8
commits into
zcash-hackworks:master
Choose a base branch
from
Geal:ibe
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-Make the message strings constants -Test case for duplicate messages in aggregate sigs
let r = Scalar::random(rng); | ||
let g_id = pairing(&master_pk, &derived) ^ &r; | ||
println!("g_id: {:?}", g_id); | ||
let badly_serialized = format!("{:?}", g_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest we break out a point_to_symmetric_key
function that does sha256(serialized point)
I've made a number of changes to the API which affect this PR:
|
tomaka
pushed a commit
to tomaka/bn
that referenced
this pull request
Mar 14, 2018
Added iz_zero for Fq2
mersinvald
pushed a commit
to etclabscore/bn
that referenced
this pull request
Jan 9, 2019
Problem: Opcode is C-like and resolve mersinvald#1
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements the Boneh Franklin "BasicIdent" IBE scheme with BN curves. I'll update the PR with the
FullIdent
scheme once I write it.From what I've read, the original scheme works on bilinear pairings, but with
G1 x G2 -> Gt
, it only requires that CDH holds in G1 and G2, and DDH holds in Gt, so it should work on BN curves (could anyone confirm this?).This PR uses the two previous ones, the first to fix compilation, the second to reuse the sighash module. I'll rebase when those are merged.
What I currently need to move this forward, is a way to serialize a point in compressed form, to generate a hash from it. The way I do it for this test is very ugly: using
format!
and theDebug
implementation forg_id
to generate a string, and hashing it with sha256.A way to serialize and deserialize arbitrary points from G1, G2 and Gt would be useful as well, to transport ciphertexts or signatures.
The hash derived from the shared
g_id
point is used to generate a Chacha20 key instead of XOR-ing it directly with the plaintext. I think it is ok, assuming that Chacha20 is a PRF, but I have not verified it yet. It keeps the malleability from the original scheme, but it would not be hard to derive more data, to do a Chacha20+Poly1305 authenticated encryption (or any other algorithm combination).