Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Aug 21, 2024
1 parent c7b88de commit 7d2caf1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl<let M: u32> EncryptedLogIncomingBody<M> {
}

pub fn compute_ciphertext(self, eph_sk: Scalar, ivpk: IvpkM) -> [u8] {
let full_key = point_to_symmetric_key(eph_sk, ivpk.inner);
let full_key = point_to_symmetric_key(eph_sk, ivpk.to_point());
let mut sym_key = [0; 16];
let mut iv = [0; 16];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ use dep::protocol_types::{
};
use std::aes128::aes128_encrypt;

use crate::{
keys::{point_to_symmetric_key::point_to_symmetric_key, public_keys::IvpkM},
utils::point::point_to_bytes
};
use crate::{keys::public_keys::IvpkM, utils::point::point_to_bytes};

struct EncryptedLogOutgoingBody {
eph_sk: Scalar,
Expand All @@ -32,7 +29,7 @@ impl EncryptedLogOutgoingBody {
let serialized_eph_sk_low = self.eph_sk.lo.to_be_bytes(32);

let address_bytes = self.recipient.to_field().to_be_bytes(32);
let serialized_recipient_ivpk = point_to_bytes(self.recipient_ivpk.inner);
let serialized_recipient_ivpk = point_to_bytes(self.recipient_ivpk.to_point());

for i in 0..32 {
buffer[i] = serialized_eph_sk_high[i];
Expand Down

0 comments on commit 7d2caf1

Please sign in to comment.