Profile Image
vishnupriya

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

What is JVM startup parameter: -XX:[+|-]UseSHA256Intrinsics? 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-usesha256intrinsics

  • x-usesha256intrinsics

  • JVM startup parameter

Please Sign In or to post your comment or answer

Profile Image

Pavel Khodakovsky

Usage:                                                    

 

The option “-XX:[+|-]UseSHA256Intrinsics” enables intrinsics for SHA-224 and SHA-256 crypto hash function.

 

Since:

 

Starting from JDK 8.

 

Syntax:

 

java -XX:[+|-]UseSHA256Intrinsics MainClass

 

Examples:

  • To enable intrinsics for SHA-224 and SHA-256: java -XX:+UseSHA256Intrinsics MainClass
  • To disable intrinsics for SHA-224 and SHA-256: java -XX:-UseSHA256Intrinsics MainClass

Description:

 

The SHA (Secure Hash Algorithm) is one of the most popular cryptographic hash functions. SHA-224 and SHA-256 with digests (hash values) that are 224 and 256 bits respectively belongs to the family of SHA-2. They use different shift amounts and additive constants, but their structures are otherwise virtually identical, differing only in the number of rounds. SHA-224 is a truncated version of SHA-256, computed with different initial values.

 

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.

 

You can use the flag “UseSHA256Intrinsics” for allowing the compiler to enable or disable intrinsics for SHA-224 and SHA-256 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, UseSHA1Intrinsics, 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-usesha256intrinsics

  • x-usesha256intrinsics

  • JVM startup parameter