Commit db6ded4 1 parent 976c4f5 commit db6ded4 Copy full SHA for db6ded4
File tree 4 files changed +18
-10
lines changed
4 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -18,20 +18,22 @@ union Inner {
18
18
impl State {
19
19
/// Initialize Poly1305 [`State`] with the given key
20
20
#[ inline]
21
- pub ( crate ) fn new ( key : & Key ) -> State {
22
- let ( token , avx2_present) = avx2_cpuid:: init_get ( ) ;
21
+ pub ( crate ) fn new ( _key : & Key ) -> State {
22
+ let ( _ , avx2_present) = avx2_cpuid:: init_get ( ) ;
23
23
24
- let inner = if avx2_present {
25
- Inner {
26
- avx2 : backend:: avx2:: State :: new ( key) ,
27
- }
24
+ if avx2_present {
25
+ //Inner {
26
+ // avx2: backend::avx2::State::new(key),
27
+ //}
28
+ panic ! ( "AVX2 detected!" ) ;
28
29
} else {
29
- Inner {
30
- soft : backend:: soft:: State :: new ( key) ,
31
- }
30
+ //Inner {
31
+ // soft: backend::soft::State::new(key),
32
+ //}
33
+ panic ! ( "AVX2 NOT detected!" )
32
34
} ;
33
35
34
- Self { inner, token }
36
+ // Self { inner, token }
35
37
}
36
38
37
39
/// Reset internal state
Original file line number Diff line number Diff line change 1
1
//! AVX2 implementation of the Poly1305 state machine.
2
2
3
+ #![ allow( dead_code) ]
4
+
3
5
// The State struct and its logic was originally derived from Goll and Gueron's AVX2 C
4
6
// code:
5
7
// [Vectorization of Poly1305 message authentication code](https://ieeexplore.ieee.org/document/7113463)
Original file line number Diff line number Diff line change 1
1
//! AVX2 helpers for implementing Poly1305 using 26-bit limbs.
2
2
3
+ #![ allow( dead_code) ]
4
+
3
5
use core:: fmt;
4
6
use core:: ops:: { Add , Mul } ;
5
7
Original file line number Diff line number Diff line change 12
12
// ...and was originally a port of Andrew Moons poly1305-donna
13
13
// https://github.com/floodyberry/poly1305-donna
14
14
15
+ #![ allow( dead_code) ]
16
+
15
17
use core:: convert:: TryInto ;
16
18
17
19
#[ cfg( feature = "zeroize" ) ]
You can’t perform that action at this time.
0 commit comments