OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "crypto/curve25519.h" |
| 6 |
| 7 #include <openssl/curve25519.h> |
| 8 |
| 9 namespace crypto { |
| 10 |
| 11 namespace curve25519 { |
| 12 |
| 13 bool ScalarMult(const uint8_t* private_key, |
| 14 const uint8_t* peer_public_key, |
| 15 uint8_t* shared_key) { |
| 16 return !!X25519(shared_key, private_key, peer_public_key); |
| 17 } |
| 18 |
| 19 void ScalarBaseMult(const uint8_t* private_key, uint8_t* public_key) { |
| 20 X25519_public_from_private(public_key, private_key); |
| 21 } |
| 22 |
| 23 } // namespace curve25519 |
| 24 |
| 25 } // namespace crypto |
OLD | NEW |