forked from awslabs/aws-lc-verification
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moving ECDH derive spec to its own file.
- Loading branch information
1 parent
f5dad26
commit 57dec43
Showing
4 changed files
with
21 additions
and
10 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
module ECDH where | ||
|
||
import Common::EC::EC_P384 | ||
import EC_primitives | ||
import EC_P384_5 | ||
|
||
ECDH_derive_bv : JacobianBVPoint -> scalar -> [bit_length] | ||
ECDH_derive_bv peer_pub_key priv_key = | ||
reverse_bytes (felem_to_bytes (felem_from_mont (felem_from_bytes (jacobianToAffine (point_mul_generic peer_pub_key priv_key)).X))) | ||
|
||
|
||
|
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