WIP: feat: starting work on xex
This commit is contained in:
parent
8a92b884a1
commit
becb953926
1 changed files with 10 additions and 0 deletions
|
|
@ -1,3 +1,5 @@
|
|||
use std::io::BufRead;
|
||||
|
||||
use anyhow::Result;
|
||||
use openssl::symm::{Cipher, Crypter, Mode};
|
||||
|
||||
|
|
@ -51,6 +53,14 @@ pub fn sea_128_decrypt(key: &Vec<u8>, input: &Vec<u8>) -> Result<Vec<u8>> {
|
|||
Ok(aes_128_decrypt(&key, &intermediate)?)
|
||||
}
|
||||
|
||||
pub fn xex_encrypt(mut key: Vec<u8>, tweak: &Vec<u8>, input: &Vec<u8>) -> Result<Vec<u8>> {
|
||||
let key_parts: Vec<u8> = key.split_off(128);
|
||||
let key1 = key_parts[0];
|
||||
let key2 = key_parts[1];
|
||||
|
||||
todo!();
|
||||
}
|
||||
|
||||
/*
|
||||
* let mut bytes: [u8; 16] = [0u8; 16];
|
||||
bytes.copy_from_slice(&ciphertext);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue