Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.4.0 #12

Merged
merged 1 commit into from Jan 12, 2019

Conversation

Projects
None yet
2 participants
@tarcieri
Copy link
Contributor

tarcieri commented Jan 12, 2019

  • Add back (off-by-default) soft-aes feature (#10)
  • Convert benchmark suite to use criterion.rs (#7)
  • Refactor using ctr and stream-cipher crates (#6)
  • Update dependencies (closes #2) (#4)
  • Update to Rust 2018 edition (#3)

@tarcieri tarcieri merged commit cff2848 into master Jan 12, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@tarcieri tarcieri deleted the v0.4.0 branch Jan 12, 2019

This was referenced Jan 12, 2019

@dpc

This comment has been minimized.

Copy link

dpc commented Jan 13, 2019

@tarcieri I've just tried to compile and got

   Compiling miscreant v0.4.0                                                                                                                         
error: unsupported target platform. Either enable appropriate target-features (+aes,+ssse3) in RUSTFLAGS or enable the 'soft-aes' cargo feature to fallback to a software AES implementation
  --> /home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/miscreant-0.4.0/src/lib.rs:48:1                                                       
   |                                                                                                                                                  
48 | / compile_error!(                                                                                                                                
49 | |     "unsupported target platform. Either enable appropriate target-features (+aes,+ssse3) \                                                    
50 | |      in RUSTFLAGS or enable the 'soft-aes' cargo feature to fallback to a software AES implementation"                                         
51 | | );                                                                                                                                             
   | |__^                                                                                                                                             
            

It used to work in previous beta version. Is that expected?

@tarcieri

This comment has been minimized.

Copy link
Contributor Author

tarcieri commented Jan 13, 2019

Yes, I disabled software fallback by default (see #10).

Either enable the appropriate target-features to use the AES-NI version, or add the soft-aes cargo feature to get the previous behavior.

@dpc

This comment has been minimized.

Copy link

dpc commented Jan 13, 2019

@tarcieri I'm looking at https://docs.rs/miscreant/0.4.0-beta2/miscreant/ and I am still a little bit unclear what do I want to do. :D

I think ideally the default should be "just work as fast as possible everywhere". soft-aes enable, and using hardware-support on platforms that support it.

So ... before (0.4.0-beta2) I was using soft-aes and no hardware support? And I won't get hardware support until I do rustflags = ["-Ctarget-feature=+aes"]? Is auto-detection of hardware capabilities implemented at all?

@tarcieri

This comment has been minimized.

Copy link
Contributor Author

tarcieri commented Jan 13, 2019

The only options right now are

  • x86/x86_64 targets only: compile with AES-NI target features (+aes,+ssse3) and get an AES-NI hardware accelerated version
  • all other targets: enable the soft-aes cargo feature to get a software fallback if the appropriate rustflags are not enabled

To my knowledge there's no support for runtime AES-NI detection /cc @newpavlov

@dpc

This comment has been minimized.

Copy link

dpc commented Jan 13, 2019

BTW. 0.4.0 failed on docs.rs https://docs.rs/crate/miscreant/0.4.0

@tarcieri

This comment has been minimized.

Copy link
Contributor Author

tarcieri commented Jan 13, 2019

I saw 😜 See #14, #15

@tarcieri

This comment has been minimized.

Copy link
Contributor Author

tarcieri commented Jan 13, 2019

Regarding the ergonomics of target-feature, you might take a look at https://internals.rust-lang.org/t/policies-around-default-cpu-architecture/9142/6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.