Profile Image
vishnupriya

What is JVM startup parameter: -XX:[+|-]UseSHA1Intrinsics?

What is JVM startup parameter: -XX:[+|-]UseSHA1Intrinsics? Have you used this JVM arguement before? What are the pros & cons of using this Java argument? Can you share your perspective/experience in using this JVM argument?

  • jvmargument

  • xx-usesha1intrinsics

  • JVM startup parameter

Please Sign In or to post your comment or answer

Profile Image

Pavel Khodakovsky

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:

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • jvmargument

  • xx-usesha1intrinsics

  • JVM startup parameter