gerritjvv / crypto Goto Github PK
View Code? Open in Web Editor NEWA simple fast encryption library for the JVM uses standard best practices and standard JVM classes
License: Apache License 2.0
A simple fast encryption library for the JVM uses standard best practices and standard JVM classes
License: Apache License 2.0
Buddy benchmarks use buddy.core.nonce/random-bytes
, which creates a new SecureRandom
instance on each invokation. This may introduce significant overhead, as the instantiation of SecureRandom
is a blocking operation that depends on available entropy.
Impact: The overhead in Buddy benchmarks hinders comparing their metrics to other benchmarks, as they do not contain similar overhead, but reuse the SecureRandom
instance.
Potential solution: invoke the buddy.core.nonce/random-bytes
two arg version, which uses the SecureRandom instance provided as the second parameter.
I'm trying to re-run the benchmarks from https://medium.com/@gerritjvv/aes-java-encryption-performance-benchmarks-3c2cb19a40e9 .
That's what I get on the 2nd run of ./build.sh build
on Debian 11 (the first run has a lot of "downloading...." clutter, so I'm omitting it here):
root@052b4bf969f1:~/crypto/crypto-perf# ./build.sh build
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< com.github.gerritjvv:crypto-core >------------------
[INFO] Building crypto-core 1.1.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ crypto-core ---
[INFO] Deleting /root/crypto/crypto-core/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ crypto-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /root/crypto/crypto-core/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ crypto-core ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to /root/crypto/crypto-core/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ crypto-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /root/crypto/crypto-core/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ crypto-core ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /root/crypto/crypto-core/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ crypto-core ---
[INFO] Surefire report directory: /root/crypto/crypto-core/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running crypto.AESTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.176 sec
Results :
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ crypto-core ---
[INFO] Building jar: /root/crypto/crypto-core/target/crypto-core-1.1.0.jar
[INFO]
[INFO] --- maven-gpg-plugin:1.6:sign (sign-artifacts) @ crypto-core ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.332 s
[INFO] Finished at: 2023-03-08T16:31:43Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.6:sign (sign-artifacts) on project crypto-core: Unable to execute gpg command: Error while executing process. Cannot run program "gpg": error=2, No such file or directory -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[INFO] Scanning for projects...
[WARNING] The project sencrypt:sencrypt:jar:1.0-SNAPSHOT uses prerequisites which is only intended for maven-plugin projects but not for non maven-plugin projects. For such purposes you should use the maven-enforcer-plugin. See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html
[INFO]
[INFO] -------------------------< sencrypt:sencrypt >--------------------------
[INFO] Building JMH benchmark sample: Java 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for crypto:crypto-core:jar:1.0-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for buddy:buddy:jar:2.0.0 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.358 s
[INFO] Finished at: 2023-03-08T16:31:44Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project sencrypt: Could not resolve dependencies for project sencrypt:sencrypt:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: crypto:crypto-core:jar:1.0-SNAPSHOT, buddy:buddy:jar:2.0.0: Could not find artifact crypto:crypto-core:jar:1.0-SNAPSHOT -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
root@052b4bf969f1:~/crypto/crypto-perf#
So I have no idea how Maven is supposed to work, but with some guesstimation there seem to be two problems:
crypto:crypto-core:jar:1.0-SNAPSHOT
should maybe be 1.1.0 now?buddy:buddy:jar:2.0.0
also needs the clojure repo defined in pom.xml
?Please create a new tag and do a new release from that tag.
The maven-release-plugin is perfect for handling releases together with mavent-gpg-plugin with the useAgent
setting.
Thanks shaping up the Java crypto space = )
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.