mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 13:16:44 +01:00
Added basic key-switching + file formatting
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use base2k::{
|
||||
alloc_aligned, Encoding, Infos, Module, Sampling, Scalar, SvpPPol, SvpPPolOps, VecZnx,
|
||||
VecZnxBig, VecZnxBigOps, VecZnxDft, VecZnxDftOps, VecZnxOps, BACKEND,
|
||||
BACKEND, Encoding, Infos, Module, Sampling, Scalar, SvpPPol, SvpPPolOps, VecZnx, VecZnxBig, VecZnxBigOps, VecZnxDft,
|
||||
VecZnxDftOps, VecZnxOps, alloc_aligned,
|
||||
};
|
||||
use itertools::izip;
|
||||
use sampling::source::Source;
|
||||
@@ -71,7 +71,7 @@ fn main() {
|
||||
19.0,
|
||||
);
|
||||
|
||||
//Decrypt
|
||||
// Decrypt
|
||||
|
||||
// buf_big <- a * s
|
||||
module.svp_apply_dft(&mut buf_dft, &s_ppol, &a);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use base2k::{
|
||||
alloc_aligned, Encoding, Infos, Module, VecZnx, VecZnxBig, VecZnxBigOps, VecZnxDft,
|
||||
VecZnxDftOps, VecZnxOps, VecZnxVec, VmpPMat, VmpPMatOps, BACKEND,
|
||||
BACKEND, Encoding, Infos, Module, VecZnx, VecZnxBig, VecZnxBigOps, VecZnxDft, VecZnxDftOps, VecZnxOps, VecZnxVec, VmpPMat,
|
||||
VmpPMatOps, alloc_aligned,
|
||||
};
|
||||
|
||||
fn main() {
|
||||
@@ -16,8 +16,7 @@ fn main() {
|
||||
let cols: usize = cols + 1;
|
||||
|
||||
// Maximum size of the byte scratch needed
|
||||
let tmp_bytes: usize = module.vmp_prepare_tmp_bytes(rows, cols)
|
||||
| module.vmp_apply_dft_tmp_bytes(cols, cols, rows, cols);
|
||||
let tmp_bytes: usize = module.vmp_prepare_tmp_bytes(rows, cols) | module.vmp_apply_dft_tmp_bytes(cols, cols, rows, cols);
|
||||
|
||||
let mut buf: Vec<u8> = alloc_aligned(tmp_bytes);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user