Usage:
The option “-XX:[+|-]UseSHA1Intrinsics” enables intrinsics for SHA-1 crypto hash function.
Since:
Starting from JDK 8.
Syntax:
java -XX:[+|-]UseSHA1Intrinsics MainClass
Examples:
- To enable intrinsics for SHA-1: java -XX:+UseSHA1Intrinsics MainClass
- To disable intrinsics for SHA-1: java -XX:-UseSHA1Intrinsics MainClass
Description:
The SHA (Secure Hash Algorithm) is one of the most popular cryptographic hash functions. SHA-1 is one of oldest version of SHA which was published in the year 1995. But since 2005, it was considered not secure and broken even it’s still widely used. It consists of a hash function which takes an input and produces a 160-bit (20-byte) hash value known as a message digest – typically rendered as 40 hexadecimal digits.
An intrinsic function is a function available for use in any programming language and it’s handled especially by the interpreter or the compiler. Typically, the interpreter or compiler replace the function with an alternative one while having the knowledge of the intrinsic function and can therefore better integrate it and optimize it for the situation.
By adding the flag, you are allowing the compiler to enable or disable intrinsics for SHA-1 crypto hash function. It requires the flag “UseSHA” to be enabled. This feature is applicable only when using the “sun.security.provider.Sun” provider for SHA operations and are supported only for Java HotSpot Server VM 64-bit on SPARC T4 and newer.
Default Value:
This option is enabled by default.
Errors:
None.
Note:
Flags that control intrinsics now require the option -XX:+UnlockDiagnosticVMOptions.
Arguments related:
UseSHA, UseSHA256Intrinsics, and UseSHA512Intrinsics.
Related Posts:
Edit your Comment