#1363 Rewrite/absorb the current pki-symkey component.
Closed: migrated by dmoluguw. Opened by jmagne.

Right now we have a Java/jni package called symkey that does much of the low level symmetric key manipulation. The JNI was needed due to the intricate derivations that take place, which are not supported in JSS.

The C portion of this code has grown out of control and has some issues.

Here is the proposal:

  1. Rewrite symkey entirely in Java. It could even be a part of TKS as a class.
  2. Get rid of all the JNI native code that we use.
  3. Beef up JSS to that it fully supports the "PK11_Derive" family of command in NSS.
    The main reason why we need the C code is to do those derivations. JSS should also be enhanced to do any other intricate operations done in symkey. These JSS calls should be able to use the full "WithFlags" variants of command families in use. This will allow for best security of the keys manipulated.

This has the following benefits.

  1. The hardest stuff/JNI is left to JSS, which will enjoy the improvements.
  2. The main logic can be kept in Java which is less prone to errors and memory constraints.
  3. Implementing future secure channel protocols will simply make use of the new JSS PK11_Derive functionality

Other must haves for the new "symkey" or whatever form it takes:

  1. Logic must be greatly simplified and refactored. Too much duplicated error prone code is used now.
  2. All symkey commands used must be of the highest security with respect to the flags in use.
  3. Of course FIPS must be preserved.
  4. We must keep JSS updated to allow for any latest and greatest derivation mechanisms and key type that come down the pike. Often we can even drive this.

Also, the PK11_Wrap and Unwrap families should be supported fully and with full flags as in NSS.

Approach:

This could be done in a dual tiered approach.

  1. Provide a very thin layer over NSS for the new supported command.
  2. Later we could come back and build on top of that to make it nicer for the user.

Metadata Update from @jmagne:
- Issue set to the milestone: UNTRIAGED

Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new
issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.

This issue has been cloned to GitHub and is available here:
https://github.com/dogtagpki/pki/issues/1925

If you want to receive further updates on the issue, please navigate to the
GitHub issue and click on Subscribe button.

Thank you for understanding, and we apologize for any inconvenience.

Metadata Update from @dmoluguw:
- Issue close_status updated to: migrated
- Issue status updated to: Closed (was: Open)

Metadata