// Do not edit directly!
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
[id="extensions-crypto"]
= Crypto (JCE)
:linkattrs:
:cq-artifact-id: camel-quarkus-crypto
:cq-native-supported: true
:cq-status: Stable
:cq-status-deprecation: Stable
:cq-description: Sign and verify exchanges using the Signature Service of the Java Cryptographic Extension (JCE).
:cq-deprecated: false
:cq-jvm-since: 1.1.0
:cq-native-since: 1.2.0

ifeval::[{doc-show-badges} == true]
[.badges]
[.badge-key]##JVM since##[.badge-supported]##1.1.0## [.badge-key]##Native since##[.badge-supported]##1.2.0##
endif::[]

Sign and verify exchanges using the Signature Service of the Java Cryptographic Extension (JCE).

[id="extensions-crypto-whats-inside"]
== What's inside

* xref:{cq-camel-components}:dataformats:crypto-dataformat.adoc[Crypto (Java Cryptographic Extension) data format]
* xref:{cq-camel-components}::crypto-component.adoc[Crypto (JCE) component], URI syntax: `crypto:cryptoOperation:name`

Please refer to the above links for usage and configuration details.

[id="extensions-crypto-maven-coordinates"]
== Maven coordinates

https://{link-quarkus-code-generator}/?extension-search=camel-quarkus-crypto[Create a new project with this extension on {link-quarkus-code-generator}, window="_blank"]

Or add the coordinates to your existing project:

[source,xml]
----
<dependency>
    <groupId>org.apache.camel.quarkus</groupId>
    <artifactId>camel-quarkus-crypto</artifactId>
</dependency>
----
ifeval::[{doc-show-user-guide-link} == true]
Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
endif::[]

[id="extensions-crypto-usage"]
== Usage
[id="extensions-crypto-usage-security-provider"]
=== Security Provider

This extension requires a BouncyCastle security provider to be https://quarkus.io/guides/security-customization#registering-security-providers[registered] and also utilizes the quarkus security extension.

NOTE: If no BouncyCastle provider is registered via the  `quarkus.security.security-providers` configuration property, then a default `BC` provider is registered automatically.

[id="extensions-crypto-usage-fips"]
=== FIPS

When running the `crypto` extension on a FIPS enabled system, a FIPS-compliant Java Security Provider (such as `BCFIPS`) has to be used.

In the case of `BCFIPS`, add dependencies `bc-fips` and `quarkus-security` to your application.

[source,xml]
----
<dependency>
    <groupId>org.bouncycastle</groupId>
    <artifactId>bc-fips</artifactId>
</dependency>
<dependency>
    <groupId>io.quarkus</groupId>
    <artifactId>quarkus-security</artifactId>
</dependency>
----

Then register the `BCFIPS` security provider by adding the following configuration to `application.properties`.

[source,properties]
----
quarkus.security.security-providers=BCFIPS
----

Alternatively, you can add a different FIPS compliant provider and register it via the `quarkus.security.security-providers` configuration property.

Refer to the https://quarkus.io/guides/security-customization#bouncy-castle-fips[Quarkus Security guide] for more information.


[id="extensions-crypto-ssl-in-native-mode"]
== SSL in native mode

This extension auto-enables SSL support in native mode. Hence you do not need to add
`quarkus.ssl.native=true` to your `application.properties` yourself. See also
https://quarkus.io/guides/native-and-ssl[Quarkus SSL guide].
