diff --git a/jni/include/com_wolfssl_wolfcrypt_Fips.h b/jni/include/com_wolfssl_wolfcrypt_Fips.h index 14a51a6..693c896 100644 --- a/jni/include/com_wolfssl_wolfcrypt_Fips.h +++ b/jni/include/com_wolfssl_wolfcrypt_Fips.h @@ -49,6 +49,30 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_setPrivateKeyReadEnable JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_getPrivateKeyReadEnable (JNIEnv *, jclass, jint); +/* + * Class: com_wolfssl_wolfcrypt_Fips + * Method: wc_runAllCast_fips + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1runAllCast_1fips + (JNIEnv *, jclass); + +/* + * Class: com_wolfssl_wolfcrypt_Fips + * Method: wolfCrypt_GetStatus_fips + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wolfCrypt_1GetStatus_1fips + (JNIEnv *, jclass); + +/* + * Class: com_wolfssl_wolfcrypt_Fips + * Method: wolfCrypt_SetStatus_fips + * Signature: (I)I + */ +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wolfCrypt_1SetStatus_1fips + (JNIEnv *, jclass, jint); + /* * Class: com_wolfssl_wolfcrypt_Fips * Method: getFipsVersion @@ -59,794 +83,778 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_getFipsVersion /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: AesSetKey_fips + * Method: wc_AesSetKey_fips * Signature: (Lcom/wolfssl/wolfcrypt/Aes;Ljava/nio/ByteBuffer;JLjava/nio/ByteBuffer;I)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesSetKey_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2I +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesSetKey_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2I (JNIEnv *, jclass, jobject, jobject, jlong, jobject, jint); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: AesSetKey_fips + * Method: wc_AesSetKey_fips * Signature: (Lcom/wolfssl/wolfcrypt/Aes;[BJ[BI)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesSetKey_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3BJ_3BI +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesSetKey_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3BJ_3BI (JNIEnv *, jclass, jobject, jbyteArray, jlong, jbyteArray, jint); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: AesSetIV_fips + * Method: wc_AesSetIV_fips * Signature: (Lcom/wolfssl/wolfcrypt/Aes;Ljava/nio/ByteBuffer;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesSetIV_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2 +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesSetIV_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2 (JNIEnv *, jclass, jobject, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: AesSetIV_fips + * Method: wc_AesSetIV_fips * Signature: (Lcom/wolfssl/wolfcrypt/Aes;[B)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesSetIV_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3B +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesSetIV_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3B (JNIEnv *, jclass, jobject, jbyteArray); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: AesCbcEncrypt_fips + * Method: wc_AesCbcEncrypt_fips * Signature: (Lcom/wolfssl/wolfcrypt/Aes;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesCbcEncrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesCbcEncrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2J (JNIEnv *, jclass, jobject, jobject, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: AesCbcEncrypt_fips + * Method: wc_AesCbcEncrypt_fips * Signature: (Lcom/wolfssl/wolfcrypt/Aes;[B[BJ)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesCbcEncrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3B_3BJ +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesCbcEncrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3B_3BJ (JNIEnv *, jclass, jobject, jbyteArray, jbyteArray, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: AesCbcDecrypt_fips + * Method: wc_AesCbcDecrypt_fips * Signature: (Lcom/wolfssl/wolfcrypt/Aes;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesCbcDecrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesCbcDecrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2J (JNIEnv *, jclass, jobject, jobject, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: AesCbcDecrypt_fips + * Method: wc_AesCbcDecrypt_fips * Signature: (Lcom/wolfssl/wolfcrypt/Aes;[B[BJ)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesCbcDecrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3B_3BJ +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesCbcDecrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3B_3BJ (JNIEnv *, jclass, jobject, jbyteArray, jbyteArray, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: AesGcmSetKey_fips + * Method: wc_AesGcmSetKey_fips * Signature: (Lcom/wolfssl/wolfcrypt/Aes;Ljava/nio/ByteBuffer;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesGcmSetKey_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesGcmSetKey_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2J (JNIEnv *, jclass, jobject, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: AesGcmSetKey_fips + * Method: wc_AesGcmSetKey_fips * Signature: (Lcom/wolfssl/wolfcrypt/Aes;[BJ)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesGcmSetKey_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3BJ +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesGcmSetKey_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3BJ (JNIEnv *, jclass, jobject, jbyteArray, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: AesGcmSetExtIV_fips + * Method: wc_AesGcmSetExtIV_fips * Signature: (Lcom/wolfssl/wolfcrypt/Aes;Ljava/nio/ByteBuffer;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesGcmSetExtIV_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesGcmSetExtIV_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2J (JNIEnv *, jclass, jobject, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: AesGcmSetExtIV_fips + * Method: wc_AesGcmSetExtIV_fips * Signature: (Lcom/wolfssl/wolfcrypt/Aes;[BJ)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesGcmSetExtIV_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3BJ +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesGcmSetExtIV_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3BJ (JNIEnv *, jclass, jobject, jbyteArray, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: AesGcmEncrypt_fips + * Method: wc_AesGcmEncrypt_fips * Signature: (Lcom/wolfssl/wolfcrypt/Aes;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;JLjava/nio/ByteBuffer;JLjava/nio/ByteBuffer;JLjava/nio/ByteBuffer;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesGcmEncrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesGcmEncrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2J (JNIEnv *, jclass, jobject, jobject, jobject, jlong, jobject, jlong, jobject, jlong, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: AesGcmEncrypt_fips + * Method: wc_AesGcmEncrypt_fips * Signature: (Lcom/wolfssl/wolfcrypt/Aes;[B[BJ[BJ[BJ[BJ)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesGcmEncrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3B_3BJ_3BJ_3BJ_3BJ +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesGcmEncrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3B_3BJ_3BJ_3BJ_3BJ (JNIEnv *, jclass, jobject, jbyteArray, jbyteArray, jlong, jbyteArray, jlong, jbyteArray, jlong, jbyteArray, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: AesGcmDecrypt_fips + * Method: wc_AesGcmDecrypt_fips * Signature: (Lcom/wolfssl/wolfcrypt/Aes;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;JLjava/nio/ByteBuffer;JLjava/nio/ByteBuffer;JLjava/nio/ByteBuffer;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesGcmDecrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesGcmDecrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2J (JNIEnv *, jclass, jobject, jobject, jobject, jlong, jobject, jlong, jobject, jlong, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: AesGcmDecrypt_fips + * Method: wc_AesGcmDecrypt_fips * Signature: (Lcom/wolfssl/wolfcrypt/Aes;[B[BJ[BJ[BJ[BJ)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesGcmDecrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3B_3BJ_3BJ_3BJ_3BJ +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesGcmDecrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3B_3BJ_3BJ_3BJ_3BJ (JNIEnv *, jclass, jobject, jbyteArray, jbyteArray, jlong, jbyteArray, jlong, jbyteArray, jlong, jbyteArray, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: Des3_SetKey_fips + * Method: wc_Des3_SetKey_fips * Signature: (Lcom/wolfssl/wolfcrypt/Des3;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;I)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Des3_1SetKey_1fips__Lcom_wolfssl_wolfcrypt_Des3_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2I +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Des3_1SetKey_1fips__Lcom_wolfssl_wolfcrypt_Des3_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2I (JNIEnv *, jclass, jobject, jobject, jobject, jint); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: Des3_SetKey_fips + * Method: wc_Des3_SetKey_fips * Signature: (Lcom/wolfssl/wolfcrypt/Des3;[B[BI)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Des3_1SetKey_1fips__Lcom_wolfssl_wolfcrypt_Des3_2_3B_3BI +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Des3_1SetKey_1fips__Lcom_wolfssl_wolfcrypt_Des3_2_3B_3BI (JNIEnv *, jclass, jobject, jbyteArray, jbyteArray, jint); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: Des3_SetIV_fips + * Method: wc_Des3_SetIV_fips * Signature: (Lcom/wolfssl/wolfcrypt/Des3;Ljava/nio/ByteBuffer;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Des3_1SetIV_1fips__Lcom_wolfssl_wolfcrypt_Des3_2Ljava_nio_ByteBuffer_2 +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Des3_1SetIV_1fips__Lcom_wolfssl_wolfcrypt_Des3_2Ljava_nio_ByteBuffer_2 (JNIEnv *, jclass, jobject, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: Des3_SetIV_fips + * Method: wc_Des3_SetIV_fips * Signature: (Lcom/wolfssl/wolfcrypt/Des3;[B)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Des3_1SetIV_1fips__Lcom_wolfssl_wolfcrypt_Des3_2_3B +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Des3_1SetIV_1fips__Lcom_wolfssl_wolfcrypt_Des3_2_3B (JNIEnv *, jclass, jobject, jbyteArray); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: Des3_CbcEncrypt_fips + * Method: wc_Des3_CbcEncrypt_fips * Signature: (Lcom/wolfssl/wolfcrypt/Des3;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Des3_1CbcEncrypt_1fips__Lcom_wolfssl_wolfcrypt_Des3_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Des3_1CbcEncrypt_1fips__Lcom_wolfssl_wolfcrypt_Des3_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2J (JNIEnv *, jclass, jobject, jobject, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: Des3_CbcEncrypt_fips + * Method: wc_Des3_CbcEncrypt_fips * Signature: (Lcom/wolfssl/wolfcrypt/Des3;[B[BJ)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Des3_1CbcEncrypt_1fips__Lcom_wolfssl_wolfcrypt_Des3_2_3B_3BJ +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Des3_1CbcEncrypt_1fips__Lcom_wolfssl_wolfcrypt_Des3_2_3B_3BJ (JNIEnv *, jclass, jobject, jbyteArray, jbyteArray, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: Des3_CbcDecrypt_fips + * Method: wc_Des3_CbcDecrypt_fips * Signature: (Lcom/wolfssl/wolfcrypt/Des3;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Des3_1CbcDecrypt_1fips__Lcom_wolfssl_wolfcrypt_Des3_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Des3_1CbcDecrypt_1fips__Lcom_wolfssl_wolfcrypt_Des3_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2J (JNIEnv *, jclass, jobject, jobject, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: Des3_CbcDecrypt_fips + * Method: wc_Des3_CbcDecrypt_fips * Signature: (Lcom/wolfssl/wolfcrypt/Des3;[B[BJ)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Des3_1CbcDecrypt_1fips__Lcom_wolfssl_wolfcrypt_Des3_2_3B_3BJ +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Des3_1CbcDecrypt_1fips__Lcom_wolfssl_wolfcrypt_Des3_2_3B_3BJ (JNIEnv *, jclass, jobject, jbyteArray, jbyteArray, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: HmacSetKey_fips + * Method: wc_HmacSetKey_fips * Signature: (Lcom/wolfssl/wolfcrypt/Hmac;ILjava/nio/ByteBuffer;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_HmacSetKey_1fips__Lcom_wolfssl_wolfcrypt_Hmac_2ILjava_nio_ByteBuffer_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1HmacSetKey_1fips__Lcom_wolfssl_wolfcrypt_Hmac_2ILjava_nio_ByteBuffer_2J (JNIEnv *, jclass, jobject, jint, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: HmacSetKey_fips + * Method: wc_HmacSetKey_fips * Signature: (Lcom/wolfssl/wolfcrypt/Hmac;I[BJ)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_HmacSetKey_1fips__Lcom_wolfssl_wolfcrypt_Hmac_2I_3BJ +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1HmacSetKey_1fips__Lcom_wolfssl_wolfcrypt_Hmac_2I_3BJ (JNIEnv *, jclass, jobject, jint, jbyteArray, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: HmacUpdate_fips + * Method: wc_HmacUpdate_fips * Signature: (Lcom/wolfssl/wolfcrypt/Hmac;Ljava/nio/ByteBuffer;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_HmacUpdate_1fips__Lcom_wolfssl_wolfcrypt_Hmac_2Ljava_nio_ByteBuffer_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1HmacUpdate_1fips__Lcom_wolfssl_wolfcrypt_Hmac_2Ljava_nio_ByteBuffer_2J (JNIEnv *, jclass, jobject, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: HmacUpdate_fips + * Method: wc_HmacUpdate_fips * Signature: (Lcom/wolfssl/wolfcrypt/Hmac;[BJ)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_HmacUpdate_1fips__Lcom_wolfssl_wolfcrypt_Hmac_2_3BJ +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1HmacUpdate_1fips__Lcom_wolfssl_wolfcrypt_Hmac_2_3BJ (JNIEnv *, jclass, jobject, jbyteArray, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: HmacFinal_fips + * Method: wc_HmacFinal_fips * Signature: (Lcom/wolfssl/wolfcrypt/Hmac;Ljava/nio/ByteBuffer;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_HmacFinal_1fips__Lcom_wolfssl_wolfcrypt_Hmac_2Ljava_nio_ByteBuffer_2 +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1HmacFinal_1fips__Lcom_wolfssl_wolfcrypt_Hmac_2Ljava_nio_ByteBuffer_2 (JNIEnv *, jclass, jobject, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: HmacFinal_fips + * Method: wc_HmacFinal_fips * Signature: (Lcom/wolfssl/wolfcrypt/Hmac;[B)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_HmacFinal_1fips__Lcom_wolfssl_wolfcrypt_Hmac_2_3B +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1HmacFinal_1fips__Lcom_wolfssl_wolfcrypt_Hmac_2_3B (JNIEnv *, jclass, jobject, jbyteArray); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: InitRng_fips + * Method: wc_InitRng_fips * Signature: (Lcom/wolfssl/wolfcrypt/Rng;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_InitRng_1fips +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1InitRng_1fips (JNIEnv *, jclass, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: FreeRng_fips + * Method: wc_FreeRng_fips * Signature: (Lcom/wolfssl/wolfcrypt/Rng;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_FreeRng_1fips +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1FreeRng_1fips (JNIEnv *, jclass, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: RNG_GenerateBlock_fips + * Method: wc_RNG_GenerateBlock_fips * Signature: (Lcom/wolfssl/wolfcrypt/Rng;Ljava/nio/ByteBuffer;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RNG_1GenerateBlock_1fips__Lcom_wolfssl_wolfcrypt_Rng_2Ljava_nio_ByteBuffer_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RNG_1GenerateBlock_1fips__Lcom_wolfssl_wolfcrypt_Rng_2Ljava_nio_ByteBuffer_2J (JNIEnv *, jclass, jobject, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: RNG_GenerateBlock_fips + * Method: wc_RNG_GenerateBlock_fips * Signature: (Lcom/wolfssl/wolfcrypt/Rng;[BJ)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RNG_1GenerateBlock_1fips__Lcom_wolfssl_wolfcrypt_Rng_2_3BJ +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RNG_1GenerateBlock_1fips__Lcom_wolfssl_wolfcrypt_Rng_2_3BJ (JNIEnv *, jclass, jobject, jbyteArray, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: RNG_HealthTest_fips + * Method: wc_RNG_HealthTest_fips * Signature: (ILjava/nio/ByteBuffer;JLjava/nio/ByteBuffer;JLjava/nio/ByteBuffer;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RNG_1HealthTest_1fips__ILjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RNG_1HealthTest_1fips__ILjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2J (JNIEnv *, jclass, jint, jobject, jlong, jobject, jlong, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: RNG_HealthTest_fips + * Method: wc_RNG_HealthTest_fips * Signature: (I[BJ[BJ[BJ)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RNG_1HealthTest_1fips__I_3BJ_3BJ_3BJ +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RNG_1HealthTest_1fips__I_3BJ_3BJ_3BJ (JNIEnv *, jclass, jint, jbyteArray, jlong, jbyteArray, jlong, jbyteArray, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: InitRsaKey_fips + * Method: wc_InitRsaKey_fips * Signature: (Lcom/wolfssl/wolfcrypt/Rsa;Ljava/nio/ByteBuffer;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_InitRsaKey_1fips +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1InitRsaKey_1fips (JNIEnv *, jclass, jobject, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: FreeRsaKey_fips + * Method: wc_FreeRsaKey_fips * Signature: (Lcom/wolfssl/wolfcrypt/Rsa;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_FreeRsaKey_1fips +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1FreeRsaKey_1fips (JNIEnv *, jclass, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: RsaSSL_Sign_fips + * Method: wc_RsaSSL_Sign_fips * Signature: (Ljava/nio/ByteBuffer;JLjava/nio/ByteBuffer;JLcom/wolfssl/wolfcrypt/Rsa;Lcom/wolfssl/wolfcrypt/Rng;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaSSL_1Sign_1fips__Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLcom_wolfssl_wolfcrypt_Rsa_2Lcom_wolfssl_wolfcrypt_Rng_2 +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaSSL_1Sign_1fips__Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLcom_wolfssl_wolfcrypt_Rsa_2Lcom_wolfssl_wolfcrypt_Rng_2 (JNIEnv *, jclass, jobject, jlong, jobject, jlong, jobject, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: RsaSSL_Sign_fips + * Method: wc_RsaSSL_Sign_fips * Signature: ([BJ[BJLcom/wolfssl/wolfcrypt/Rsa;Lcom/wolfssl/wolfcrypt/Rng;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaSSL_1Sign_1fips___3BJ_3BJLcom_wolfssl_wolfcrypt_Rsa_2Lcom_wolfssl_wolfcrypt_Rng_2 +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaSSL_1Sign_1fips___3BJ_3BJLcom_wolfssl_wolfcrypt_Rsa_2Lcom_wolfssl_wolfcrypt_Rng_2 (JNIEnv *, jclass, jbyteArray, jlong, jbyteArray, jlong, jobject, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: RsaSSL_Verify_fips + * Method: wc_RsaSSL_Verify_fips * Signature: (Ljava/nio/ByteBuffer;JLjava/nio/ByteBuffer;JLcom/wolfssl/wolfcrypt/Rsa;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaSSL_1Verify_1fips__Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLcom_wolfssl_wolfcrypt_Rsa_2 +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaSSL_1Verify_1fips__Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLcom_wolfssl_wolfcrypt_Rsa_2 (JNIEnv *, jclass, jobject, jlong, jobject, jlong, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: RsaSSL_Verify_fips + * Method: wc_RsaSSL_Verify_fips * Signature: ([BJ[BJLcom/wolfssl/wolfcrypt/Rsa;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaSSL_1Verify_1fips___3BJ_3BJLcom_wolfssl_wolfcrypt_Rsa_2 +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaSSL_1Verify_1fips___3BJ_3BJLcom_wolfssl_wolfcrypt_Rsa_2 (JNIEnv *, jclass, jbyteArray, jlong, jbyteArray, jlong, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: RsaEncryptSize_fips + * Method: wc_RsaEncryptSize_fips * Signature: (Lcom/wolfssl/wolfcrypt/Rsa;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaEncryptSize_1fips +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaEncryptSize_1fips (JNIEnv *, jclass, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: RsaPrivateKeyDecode_fips + * Method: wc_RsaPrivateKeyDecode_fips * Signature: (Ljava/nio/ByteBuffer;[JLcom/wolfssl/wolfcrypt/Rsa;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaPrivateKeyDecode_1fips__Ljava_nio_ByteBuffer_2_3JLcom_wolfssl_wolfcrypt_Rsa_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaPrivateKeyDecode_1fips__Ljava_nio_ByteBuffer_2_3JLcom_wolfssl_wolfcrypt_Rsa_2J (JNIEnv *, jclass, jobject, jlongArray, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: RsaPrivateKeyDecode_fips + * Method: wc_RsaPrivateKeyDecode_fips * Signature: ([B[JLcom/wolfssl/wolfcrypt/Rsa;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaPrivateKeyDecode_1fips___3B_3JLcom_wolfssl_wolfcrypt_Rsa_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaPrivateKeyDecode_1fips___3B_3JLcom_wolfssl_wolfcrypt_Rsa_2J (JNIEnv *, jclass, jbyteArray, jlongArray, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: RsaPublicKeyDecode_fips + * Method: wc_RsaPublicKeyDecode_fips * Signature: (Ljava/nio/ByteBuffer;[JLcom/wolfssl/wolfcrypt/Rsa;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaPublicKeyDecode_1fips__Ljava_nio_ByteBuffer_2_3JLcom_wolfssl_wolfcrypt_Rsa_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaPublicKeyDecode_1fips__Ljava_nio_ByteBuffer_2_3JLcom_wolfssl_wolfcrypt_Rsa_2J (JNIEnv *, jclass, jobject, jlongArray, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: RsaPublicKeyDecode_fips + * Method: wc_RsaPublicKeyDecode_fips * Signature: ([B[JLcom/wolfssl/wolfcrypt/Rsa;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaPublicKeyDecode_1fips___3B_3JLcom_wolfssl_wolfcrypt_Rsa_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaPublicKeyDecode_1fips___3B_3JLcom_wolfssl_wolfcrypt_Rsa_2J (JNIEnv *, jclass, jbyteArray, jlongArray, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: InitSha_fips + * Method: wc_InitSha_fips * Signature: (Lcom/wolfssl/wolfcrypt/Sha;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_InitSha_1fips +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1InitSha_1fips (JNIEnv *, jclass, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: ShaUpdate_fips + * Method: wc_ShaUpdate_fips * Signature: (Lcom/wolfssl/wolfcrypt/Sha;Ljava/nio/ByteBuffer;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ShaUpdate_1fips__Lcom_wolfssl_wolfcrypt_Sha_2Ljava_nio_ByteBuffer_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ShaUpdate_1fips__Lcom_wolfssl_wolfcrypt_Sha_2Ljava_nio_ByteBuffer_2J (JNIEnv *, jclass, jobject, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: ShaUpdate_fips + * Method: wc_ShaUpdate_fips * Signature: (Lcom/wolfssl/wolfcrypt/Sha;[BJ)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ShaUpdate_1fips__Lcom_wolfssl_wolfcrypt_Sha_2_3BJ +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ShaUpdate_1fips__Lcom_wolfssl_wolfcrypt_Sha_2_3BJ (JNIEnv *, jclass, jobject, jbyteArray, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: ShaFinal_fips + * Method: wc_ShaFinal_fips * Signature: (Lcom/wolfssl/wolfcrypt/Sha;Ljava/nio/ByteBuffer;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ShaFinal_1fips__Lcom_wolfssl_wolfcrypt_Sha_2Ljava_nio_ByteBuffer_2 +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ShaFinal_1fips__Lcom_wolfssl_wolfcrypt_Sha_2Ljava_nio_ByteBuffer_2 (JNIEnv *, jclass, jobject, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: ShaFinal_fips + * Method: wc_ShaFinal_fips * Signature: (Lcom/wolfssl/wolfcrypt/Sha;[B)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ShaFinal_1fips__Lcom_wolfssl_wolfcrypt_Sha_2_3B +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ShaFinal_1fips__Lcom_wolfssl_wolfcrypt_Sha_2_3B (JNIEnv *, jclass, jobject, jbyteArray); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: InitSha256_fips + * Method: wc_InitSha256_fips * Signature: (Lcom/wolfssl/wolfcrypt/Sha256;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_InitSha256_1fips +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1InitSha256_1fips (JNIEnv *, jclass, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: Sha256Update_fips + * Method: wc_Sha256Update_fips * Signature: (Lcom/wolfssl/wolfcrypt/Sha256;Ljava/nio/ByteBuffer;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha256Update_1fips__Lcom_wolfssl_wolfcrypt_Sha256_2Ljava_nio_ByteBuffer_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Sha256Update_1fips__Lcom_wolfssl_wolfcrypt_Sha256_2Ljava_nio_ByteBuffer_2J (JNIEnv *, jclass, jobject, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: Sha256Update_fips + * Method: wc_Sha256Update_fips * Signature: (Lcom/wolfssl/wolfcrypt/Sha256;[BJ)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha256Update_1fips__Lcom_wolfssl_wolfcrypt_Sha256_2_3BJ +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Sha256Update_1fips__Lcom_wolfssl_wolfcrypt_Sha256_2_3BJ (JNIEnv *, jclass, jobject, jbyteArray, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: Sha256Final_fips + * Method: wc_Sha256Final_fips * Signature: (Lcom/wolfssl/wolfcrypt/Sha256;Ljava/nio/ByteBuffer;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha256Final_1fips__Lcom_wolfssl_wolfcrypt_Sha256_2Ljava_nio_ByteBuffer_2 +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Sha256Final_1fips__Lcom_wolfssl_wolfcrypt_Sha256_2Ljava_nio_ByteBuffer_2 (JNIEnv *, jclass, jobject, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: Sha256Final_fips + * Method: wc_Sha256Final_fips * Signature: (Lcom/wolfssl/wolfcrypt/Sha256;[B)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha256Final_1fips__Lcom_wolfssl_wolfcrypt_Sha256_2_3B +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Sha256Final_1fips__Lcom_wolfssl_wolfcrypt_Sha256_2_3B (JNIEnv *, jclass, jobject, jbyteArray); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: InitSha384_fips + * Method: wc_InitSha384_fips * Signature: (Lcom/wolfssl/wolfcrypt/Sha384;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_InitSha384_1fips +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1InitSha384_1fips (JNIEnv *, jclass, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: Sha384Update_fips + * Method: wc_Sha384Update_fips * Signature: (Lcom/wolfssl/wolfcrypt/Sha384;Ljava/nio/ByteBuffer;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha384Update_1fips__Lcom_wolfssl_wolfcrypt_Sha384_2Ljava_nio_ByteBuffer_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Sha384Update_1fips__Lcom_wolfssl_wolfcrypt_Sha384_2Ljava_nio_ByteBuffer_2J (JNIEnv *, jclass, jobject, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: Sha384Update_fips + * Method: wc_Sha384Update_fips * Signature: (Lcom/wolfssl/wolfcrypt/Sha384;[BJ)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha384Update_1fips__Lcom_wolfssl_wolfcrypt_Sha384_2_3BJ +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Sha384Update_1fips__Lcom_wolfssl_wolfcrypt_Sha384_2_3BJ (JNIEnv *, jclass, jobject, jbyteArray, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: Sha384Final_fips + * Method: wc_Sha384Final_fips * Signature: (Lcom/wolfssl/wolfcrypt/Sha384;Ljava/nio/ByteBuffer;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha384Final_1fips__Lcom_wolfssl_wolfcrypt_Sha384_2Ljava_nio_ByteBuffer_2 +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Sha384Final_1fips__Lcom_wolfssl_wolfcrypt_Sha384_2Ljava_nio_ByteBuffer_2 (JNIEnv *, jclass, jobject, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: Sha384Final_fips + * Method: wc_Sha384Final_fips * Signature: (Lcom/wolfssl/wolfcrypt/Sha384;[B)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha384Final_1fips__Lcom_wolfssl_wolfcrypt_Sha384_2_3B +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Sha384Final_1fips__Lcom_wolfssl_wolfcrypt_Sha384_2_3B (JNIEnv *, jclass, jobject, jbyteArray); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: InitSha512_fips + * Method: wc_InitSha512_fips * Signature: (Lcom/wolfssl/wolfcrypt/Sha512;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_InitSha512_1fips +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1InitSha512_1fips (JNIEnv *, jclass, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: Sha512Update_fips + * Method: wc_Sha512Update_fips * Signature: (Lcom/wolfssl/wolfcrypt/Sha512;Ljava/nio/ByteBuffer;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha512Update_1fips__Lcom_wolfssl_wolfcrypt_Sha512_2Ljava_nio_ByteBuffer_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Sha512Update_1fips__Lcom_wolfssl_wolfcrypt_Sha512_2Ljava_nio_ByteBuffer_2J (JNIEnv *, jclass, jobject, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: Sha512Update_fips + * Method: wc_Sha512Update_fips * Signature: (Lcom/wolfssl/wolfcrypt/Sha512;[BJ)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha512Update_1fips__Lcom_wolfssl_wolfcrypt_Sha512_2_3BJ +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Sha512Update_1fips__Lcom_wolfssl_wolfcrypt_Sha512_2_3BJ (JNIEnv *, jclass, jobject, jbyteArray, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: Sha512Final_fips + * Method: wc_Sha512Final_fips * Signature: (Lcom/wolfssl/wolfcrypt/Sha512;Ljava/nio/ByteBuffer;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha512Final_1fips__Lcom_wolfssl_wolfcrypt_Sha512_2Ljava_nio_ByteBuffer_2 +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Sha512Final_1fips__Lcom_wolfssl_wolfcrypt_Sha512_2Ljava_nio_ByteBuffer_2 (JNIEnv *, jclass, jobject, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: Sha512Final_fips + * Method: wc_Sha512Final_fips * Signature: (Lcom/wolfssl/wolfcrypt/Sha512;[B)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha512Final_1fips__Lcom_wolfssl_wolfcrypt_Sha512_2_3B +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Sha512Final_1fips__Lcom_wolfssl_wolfcrypt_Sha512_2_3B (JNIEnv *, jclass, jobject, jbyteArray); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: wolfCrypt_GetStatus_fips - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wolfCrypt_1GetStatus_1fips - (JNIEnv *, jclass); - -/* - * Class: com_wolfssl_wolfcrypt_Fips - * Method: wolfCrypt_SetStatus_fips - * Signature: (I)I - */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wolfCrypt_1SetStatus_1fips - (JNIEnv *, jclass, jint); - -/* - * Class: com_wolfssl_wolfcrypt_Fips - * Method: RsaPublicEncrypt_fips + * Method: wc_RsaPublicEncrypt_fips * Signature: (Ljava/nio/ByteBuffer;JLjava/nio/ByteBuffer;JLcom/wolfssl/wolfcrypt/Rsa;Lcom/wolfssl/wolfcrypt/Rng;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaPublicEncrypt_1fips__Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLcom_wolfssl_wolfcrypt_Rsa_2Lcom_wolfssl_wolfcrypt_Rng_2 +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaPublicEncrypt_1fips__Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLcom_wolfssl_wolfcrypt_Rsa_2Lcom_wolfssl_wolfcrypt_Rng_2 (JNIEnv *, jclass, jobject, jlong, jobject, jlong, jobject, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: RsaPublicEncrypt_fips + * Method: wc_RsaPublicEncrypt_fips * Signature: ([BJ[BJLcom/wolfssl/wolfcrypt/Rsa;Lcom/wolfssl/wolfcrypt/Rng;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaPublicEncrypt_1fips___3BJ_3BJLcom_wolfssl_wolfcrypt_Rsa_2Lcom_wolfssl_wolfcrypt_Rng_2 +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaPublicEncrypt_1fips___3BJ_3BJLcom_wolfssl_wolfcrypt_Rsa_2Lcom_wolfssl_wolfcrypt_Rng_2 (JNIEnv *, jclass, jbyteArray, jlong, jbyteArray, jlong, jobject, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: RsaPrivateDecrypt_fips + * Method: wc_RsaPrivateDecrypt_fips * Signature: (Ljava/nio/ByteBuffer;JLjava/nio/ByteBuffer;JLcom/wolfssl/wolfcrypt/Rsa;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaPrivateDecrypt_1fips__Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLcom_wolfssl_wolfcrypt_Rsa_2 +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaPrivateDecrypt_1fips__Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLcom_wolfssl_wolfcrypt_Rsa_2 (JNIEnv *, jclass, jobject, jlong, jobject, jlong, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: RsaPrivateDecrypt_fips + * Method: wc_RsaPrivateDecrypt_fips * Signature: ([BJ[BJLcom/wolfssl/wolfcrypt/Rsa;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaPrivateDecrypt_1fips___3BJ_3BJLcom_wolfssl_wolfcrypt_Rsa_2 +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaPrivateDecrypt_1fips___3BJ_3BJLcom_wolfssl_wolfcrypt_Rsa_2 (JNIEnv *, jclass, jbyteArray, jlong, jbyteArray, jlong, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: InitMd5 + * Method: wc_InitMd5 * Signature: (Lcom/wolfssl/wolfcrypt/Md5;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_InitMd5 +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1InitMd5 (JNIEnv *, jclass, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: Md5Update + * Method: wc_Md5Update * Signature: (Lcom/wolfssl/wolfcrypt/Md5;Ljava/nio/ByteBuffer;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Md5Update__Lcom_wolfssl_wolfcrypt_Md5_2Ljava_nio_ByteBuffer_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Md5Update__Lcom_wolfssl_wolfcrypt_Md5_2Ljava_nio_ByteBuffer_2J (JNIEnv *, jclass, jobject, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: Md5Update + * Method: wc_Md5Update * Signature: (Lcom/wolfssl/wolfcrypt/Md5;[BJ)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Md5Update__Lcom_wolfssl_wolfcrypt_Md5_2_3BJ +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Md5Update__Lcom_wolfssl_wolfcrypt_Md5_2_3BJ (JNIEnv *, jclass, jobject, jbyteArray, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: Md5Final + * Method: wc_Md5Final * Signature: (Lcom/wolfssl/wolfcrypt/Md5;Ljava/nio/ByteBuffer;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Md5Final__Lcom_wolfssl_wolfcrypt_Md5_2Ljava_nio_ByteBuffer_2 +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Md5Final__Lcom_wolfssl_wolfcrypt_Md5_2Ljava_nio_ByteBuffer_2 (JNIEnv *, jclass, jobject, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: Md5Final + * Method: wc_Md5Final * Signature: (Lcom/wolfssl/wolfcrypt/Md5;[B)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Md5Final__Lcom_wolfssl_wolfcrypt_Md5_2_3B +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Md5Final__Lcom_wolfssl_wolfcrypt_Md5_2_3B (JNIEnv *, jclass, jobject, jbyteArray); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: InitDhKey + * Method: wc_InitDhKey * Signature: (Lcom/wolfssl/wolfcrypt/Dh;)V */ -JNIEXPORT void JNICALL Java_com_wolfssl_wolfcrypt_Fips_InitDhKey +JNIEXPORT void JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1InitDhKey (JNIEnv *, jclass, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: FreeDhKey + * Method: wc_FreeDhKey * Signature: (Lcom/wolfssl/wolfcrypt/Dh;)V */ -JNIEXPORT void JNICALL Java_com_wolfssl_wolfcrypt_Fips_FreeDhKey +JNIEXPORT void JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1FreeDhKey (JNIEnv *, jclass, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: DhGenerateKeyPair + * Method: wc_DhGenerateKeyPair * Signature: (Lcom/wolfssl/wolfcrypt/Dh;Lcom/wolfssl/wolfcrypt/Rng;Ljava/nio/ByteBuffer;[JLjava/nio/ByteBuffer;[J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhGenerateKeyPair__Lcom_wolfssl_wolfcrypt_Dh_2Lcom_wolfssl_wolfcrypt_Rng_2Ljava_nio_ByteBuffer_2_3JLjava_nio_ByteBuffer_2_3J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1DhGenerateKeyPair__Lcom_wolfssl_wolfcrypt_Dh_2Lcom_wolfssl_wolfcrypt_Rng_2Ljava_nio_ByteBuffer_2_3JLjava_nio_ByteBuffer_2_3J (JNIEnv *, jclass, jobject, jobject, jobject, jlongArray, jobject, jlongArray); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: DhGenerateKeyPair + * Method: wc_DhGenerateKeyPair * Signature: (Lcom/wolfssl/wolfcrypt/Dh;Lcom/wolfssl/wolfcrypt/Rng;[B[J[B[J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhGenerateKeyPair__Lcom_wolfssl_wolfcrypt_Dh_2Lcom_wolfssl_wolfcrypt_Rng_2_3B_3J_3B_3J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1DhGenerateKeyPair__Lcom_wolfssl_wolfcrypt_Dh_2Lcom_wolfssl_wolfcrypt_Rng_2_3B_3J_3B_3J (JNIEnv *, jclass, jobject, jobject, jbyteArray, jlongArray, jbyteArray, jlongArray); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: DhAgree + * Method: wc_DhAgree * Signature: (Lcom/wolfssl/wolfcrypt/Dh;Ljava/nio/ByteBuffer;[JLjava/nio/ByteBuffer;JLjava/nio/ByteBuffer;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhAgree__Lcom_wolfssl_wolfcrypt_Dh_2Ljava_nio_ByteBuffer_2_3JLjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1DhAgree__Lcom_wolfssl_wolfcrypt_Dh_2Ljava_nio_ByteBuffer_2_3JLjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2J (JNIEnv *, jclass, jobject, jobject, jlongArray, jobject, jlong, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: DhAgree + * Method: wc_DhAgree * Signature: (Lcom/wolfssl/wolfcrypt/Dh;[B[J[BJ[BJ)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhAgree__Lcom_wolfssl_wolfcrypt_Dh_2_3B_3J_3BJ_3BJ +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1DhAgree__Lcom_wolfssl_wolfcrypt_Dh_2_3B_3J_3BJ_3BJ (JNIEnv *, jclass, jobject, jbyteArray, jlongArray, jbyteArray, jlong, jbyteArray, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: DhKeyDecode + * Method: wc_DhKeyDecode * Signature: (Ljava/nio/ByteBuffer;[JLcom/wolfssl/wolfcrypt/Dh;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhKeyDecode__Ljava_nio_ByteBuffer_2_3JLcom_wolfssl_wolfcrypt_Dh_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1DhKeyDecode__Ljava_nio_ByteBuffer_2_3JLcom_wolfssl_wolfcrypt_Dh_2J (JNIEnv *, jclass, jobject, jlongArray, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: DhKeyDecode + * Method: wc_DhKeyDecode * Signature: ([B[JLcom/wolfssl/wolfcrypt/Dh;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhKeyDecode___3B_3JLcom_wolfssl_wolfcrypt_Dh_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1DhKeyDecode___3B_3JLcom_wolfssl_wolfcrypt_Dh_2J (JNIEnv *, jclass, jbyteArray, jlongArray, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: DhSetKey + * Method: wc_DhSetKey * Signature: (Lcom/wolfssl/wolfcrypt/Dh;Ljava/nio/ByteBuffer;JLjava/nio/ByteBuffer;J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhSetKey__Lcom_wolfssl_wolfcrypt_Dh_2Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1DhSetKey__Lcom_wolfssl_wolfcrypt_Dh_2Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2J (JNIEnv *, jclass, jobject, jobject, jlong, jobject, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: DhSetKey + * Method: wc_DhSetKey * Signature: (Lcom/wolfssl/wolfcrypt/Dh;[BJ[BJ)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhSetKey__Lcom_wolfssl_wolfcrypt_Dh_2_3BJ_3BJ +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1DhSetKey__Lcom_wolfssl_wolfcrypt_Dh_2_3BJ_3BJ (JNIEnv *, jclass, jobject, jbyteArray, jlong, jbyteArray, jlong); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: DhParamsLoad + * Method: wc_DhParamsLoad * Signature: (Ljava/nio/ByteBuffer;JLjava/nio/ByteBuffer;[JLjava/nio/ByteBuffer;[J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhParamsLoad__Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2_3JLjava_nio_ByteBuffer_2_3J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1DhParamsLoad__Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2_3JLjava_nio_ByteBuffer_2_3J (JNIEnv *, jclass, jobject, jlong, jobject, jlongArray, jobject, jlongArray); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: DhParamsLoad + * Method: wc_DhParamsLoad * Signature: ([BJ[B[J[B[J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhParamsLoad___3BJ_3B_3J_3B_3J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1DhParamsLoad___3BJ_3B_3J_3B_3J (JNIEnv *, jclass, jbyteArray, jlong, jbyteArray, jlongArray, jbyteArray, jlongArray); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: ecc_init + * Method: wc_ecc_init * Signature: (Lcom/wolfssl/wolfcrypt/Ecc;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1init +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ecc_1init (JNIEnv *, jclass, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: ecc_free + * Method: wc_ecc_free * Signature: (Lcom/wolfssl/wolfcrypt/Ecc;)V */ -JNIEXPORT void JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1free +JNIEXPORT void JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ecc_1free (JNIEnv *, jclass, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: ecc_make_key + * Method: wc_ecc_make_key * Signature: (Lcom/wolfssl/wolfcrypt/Rng;ILcom/wolfssl/wolfcrypt/Ecc;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1make_1key +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ecc_1make_1key (JNIEnv *, jclass, jobject, jint, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: ecc_shared_secret + * Method: wc_ecc_shared_secret * Signature: (Lcom/wolfssl/wolfcrypt/Ecc;Lcom/wolfssl/wolfcrypt/Ecc;Ljava/nio/ByteBuffer;[J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1shared_1secret__Lcom_wolfssl_wolfcrypt_Ecc_2Lcom_wolfssl_wolfcrypt_Ecc_2Ljava_nio_ByteBuffer_2_3J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ecc_1shared_1secret__Lcom_wolfssl_wolfcrypt_Ecc_2Lcom_wolfssl_wolfcrypt_Ecc_2Ljava_nio_ByteBuffer_2_3J (JNIEnv *, jclass, jobject, jobject, jobject, jlongArray); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: ecc_shared_secret + * Method: wc_ecc_shared_secret * Signature: (Lcom/wolfssl/wolfcrypt/Ecc;Lcom/wolfssl/wolfcrypt/Ecc;[B[J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1shared_1secret__Lcom_wolfssl_wolfcrypt_Ecc_2Lcom_wolfssl_wolfcrypt_Ecc_2_3B_3J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ecc_1shared_1secret__Lcom_wolfssl_wolfcrypt_Ecc_2Lcom_wolfssl_wolfcrypt_Ecc_2_3B_3J (JNIEnv *, jclass, jobject, jobject, jbyteArray, jlongArray); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: ecc_import_x963 + * Method: wc_ecc_import_x963 * Signature: (Ljava/nio/ByteBuffer;JLcom/wolfssl/wolfcrypt/Ecc;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1import_1x963__Ljava_nio_ByteBuffer_2JLcom_wolfssl_wolfcrypt_Ecc_2 +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ecc_1import_1x963__Ljava_nio_ByteBuffer_2JLcom_wolfssl_wolfcrypt_Ecc_2 (JNIEnv *, jclass, jobject, jlong, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: ecc_import_x963 + * Method: wc_ecc_import_x963 * Signature: ([BJLcom/wolfssl/wolfcrypt/Ecc;)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1import_1x963___3BJLcom_wolfssl_wolfcrypt_Ecc_2 +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ecc_1import_1x963___3BJLcom_wolfssl_wolfcrypt_Ecc_2 (JNIEnv *, jclass, jbyteArray, jlong, jobject); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: ecc_export_x963 + * Method: wc_ecc_export_x963 * Signature: (Lcom/wolfssl/wolfcrypt/Ecc;Ljava/nio/ByteBuffer;[J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1export_1x963__Lcom_wolfssl_wolfcrypt_Ecc_2Ljava_nio_ByteBuffer_2_3J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ecc_1export_1x963__Lcom_wolfssl_wolfcrypt_Ecc_2Ljava_nio_ByteBuffer_2_3J (JNIEnv *, jclass, jobject, jobject, jlongArray); /* * Class: com_wolfssl_wolfcrypt_Fips - * Method: ecc_export_x963 + * Method: wc_ecc_export_x963 * Signature: (Lcom/wolfssl/wolfcrypt/Ecc;[B[J)I */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1export_1x963__Lcom_wolfssl_wolfcrypt_Ecc_2_3B_3J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ecc_1export_1x963__Lcom_wolfssl_wolfcrypt_Ecc_2_3B_3J (JNIEnv *, jclass, jobject, jbyteArray, jlongArray); #ifdef __cplusplus diff --git a/jni/jni_fips.c b/jni/jni_fips.c index 7e68d91..75d5708 100644 --- a/jni/jni_fips.c +++ b/jni/jni_fips.c @@ -170,6 +170,177 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_getPrivateKeyReadEnable return ret; } +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1runAllCast_1fips + (JNIEnv* jenv, jclass jcl) +{ +#if defined (WC_RNG_SEED_CB) || (defined(HAVE_FIPS) && \ + defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION == 5)) + int ret = 0; +#endif + int failCount = 0; + + (void)jenv; + (void)jcl; + +#ifdef WC_RNG_SEED_CB + ret = wc_SetSeed_Cb(wc_GenerateSeed); + if (ret != 0) { + printf("wc_SetSeed_Cb() failed"); + } +#endif + +#if defined(HAVE_FIPS) && defined(HAVE_FIPS_VERSION) && \ + (HAVE_FIPS_VERSION >= 7) + + failCount = wc_RunAllCast_fips(); + if (failCount != 0) { + printf("FIPS CASTs failed to run"); + } + +#elif defined(HAVE_FIPS) && defined(HAVE_FIPS_VERSION) && \ + (HAVE_FIPS_VERSION == 5) + + /* run FIPS 140-3 conditional algorithm self tests early to prevent + * multi threaded issues later on */ +#if !defined(NO_AES) && !defined(NO_AES_CBC) + if (ret == 0) { + ret = wc_RunCast_fips(FIPS_CAST_AES_CBC); + if (ret != 0) { + printf("AES-CBC CAST failed"); + failCount++; + } + } +#endif +#ifdef HAVE_AESGCM + if (ret == 0) { + ret = wc_RunCast_fips(FIPS_CAST_AES_GCM); + if (ret != 0) { + printf("AES-GCM CAST failed"); + failCount++; + } + } +#endif +#ifndef NO_SHA + if (ret == 0) { + ret = wc_RunCast_fips(FIPS_CAST_HMAC_SHA1); + if (ret != 0) { + printf("HMAC-SHA1 CAST failed"); + failCount++; + } + } +#endif + /* the only non-optional CAST */ + if (ret == 0) { + ret = wc_RunCast_fips(FIPS_CAST_HMAC_SHA2_256); + if (ret != 0) { + printf("HMAC-SHA2-256 CAST failed"); + failCount++; + } + } +#ifdef WOLFSSL_SHA512 + if (ret == 0) { + ret = wc_RunCast_fips(FIPS_CAST_HMAC_SHA2_512); + if (ret != 0) { + printf("HMAC-SHA2-512 CAST failed"); + failCount++; + } + } +#endif +#ifdef WOLFSSL_SHA3 + if (ret == 0) { + ret = wc_RunCast_fips(FIPS_CAST_HMAC_SHA3_256); + if (ret != 0) { + printf("HMAC-SHA3-256 CAST failed"); + failCount++; + } + } +#endif +#ifdef HAVE_HASHDRBG + if (ret == 0) { + ret = wc_RunCast_fips(FIPS_CAST_DRBG); + if (ret != 0) { + printf("Hash_DRBG CAST failed"); + failCount++; + } + } +#endif +#ifndef NO_RSA + if (ret == 0) { + ret = wc_RunCast_fips(FIPS_CAST_RSA_SIGN_PKCS1v15); + if (ret != 0) { + printf("RSA sign CAST failed"); + failCount++; + } + } +#endif +#if defined(HAVE_ECC_CDH) && defined(HAVE_ECC_CDH_CAST) + if (ret == 0) { + ret = wc_RunCast_fips(FIPS_CAST_ECC_CDH); + if (ret != 0) { + printf("ECC CDH CAST failed"); + failCount++; + } + } +#endif +#ifdef HAVE_ECC_DHE + if (ret == 0) { + ret = wc_RunCast_fips(FIPS_CAST_ECC_PRIMITIVE_Z); + if (ret != 0) { + printf("ECC Primitive Z CAST failed"); + failCount++; + } + } +#endif +#ifdef HAVE_ECC + if (ret == 0) { + ret = wc_RunCast_fips(FIPS_CAST_ECDSA); + if (ret != 0) { + printf("ECDSA CAST failed"); + failCount++; + } + } +#endif +#ifndef NO_DH + if (ret == 0) { + ret = wc_RunCast_fips(FIPS_CAST_DH_PRIMITIVE_Z); + if (ret != 0) { + printf("DH Primitive Z CAST failed"); + failCount++; + } + } +#endif +#ifdef WOLFSSL_HAVE_PRF + if (ret == 0) { + ret = wc_RunCast_fips(FIPS_CAST_KDF_TLS12); + if (ret != 0) { + printf("KDF TLSv1.2 CAST failed"); + failCount++; + } + } +#endif +#if defined(WOLFSSL_HAVE_PRF) && defined(WOLFSSL_TLS13) + if (ret == 0) { + ret = wc_RunCast_fips(FIPS_CAST_KDF_TLS13); + if (ret != 0) { + printf("KDF TLSv1.3 CAST failed"); + failCount++; + } + } +#endif +#ifdef WOLFSSL_WOLFSSH + if (ret == 0) { + ret = wc_RunCast_fips(FIPS_CAST_KDF_SSH); + if (ret != 0) { + printf("KDF SSHv2.0 CAST failed"); + failCount++; + } + } +#endif +#endif /* HAVE_FIPS && HAVE_FIPS_VERSION == 5 */ + + return failCount; +} + JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_getFipsVersion (JNIEnv* env, jclass this) { @@ -194,7 +365,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_getFipsVersion /* AES */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesSetKey_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2I( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesSetKey_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2I( JNIEnv* env, jclass class, jobject aes_object, jobject key_buffer, jlong size, jobject iv_buffer, jint dir) { @@ -236,7 +407,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesSetKey_1fips__Lcom_wol return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesSetKey_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3BJ_3BI( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesSetKey_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3BJ_3BI( JNIEnv* env, jclass class, jobject aes_object, jbyteArray key_buffer, jlong size, jbyteArray iv_buffer, jint dir) { @@ -283,7 +454,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesSetKey_1fips__Lcom_wol return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesGcmSetExtIV_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2J +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesGcmSetExtIV_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2J (JNIEnv* env, jclass class, jobject aes_object, jobject iv_buffer, jlong size) { jint ret = NOT_COMPILED_IN; @@ -321,7 +492,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesGcmSetExtIV_1fips__Lco return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesGcmSetExtIV_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3BJ +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesGcmSetExtIV_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3BJ (JNIEnv* env, jclass class, jobject aes_object, jbyteArray iv_buffer, jlong size) { jint ret = NOT_COMPILED_IN; @@ -361,7 +532,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesGcmSetExtIV_1fips__Lco return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesSetIV_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesSetIV_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2( JNIEnv* env, jclass class, jobject aes_object, jobject iv_buffer) { jint ret = NOT_COMPILED_IN; @@ -397,7 +568,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesSetIV_1fips__Lcom_wolf return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesSetIV_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3B( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesSetIV_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3B( JNIEnv* env, jclass class, jobject aes_object, jbyteArray iv_buffer) { jint ret = NOT_COMPILED_IN; @@ -437,7 +608,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesSetIV_1fips__Lcom_wolf return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesCbcEncrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesCbcEncrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2J( JNIEnv* env, jclass class, jobject aes_object, jobject out_buffer, jobject in_buffer, jlong size) { @@ -478,7 +649,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesCbcEncrypt_1fips__Lcom return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesCbcEncrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3B_3BJ( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesCbcEncrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3B_3BJ( JNIEnv* env, jclass class, jobject aes_object, jbyteArray out_buffer, jbyteArray in_buffer, jlong size) { @@ -524,7 +695,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesCbcEncrypt_1fips__Lcom return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesCbcDecrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesCbcDecrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2J( JNIEnv* env, jclass class, jobject aes_object, jobject out_buffer, jobject in_buffer, jlong size) { @@ -565,7 +736,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesCbcDecrypt_1fips__Lcom return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesCbcDecrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3B_3BJ( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesCbcDecrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3B_3BJ( JNIEnv* env, jclass class, jobject aes_object, jbyteArray out_buffer, jbyteArray in_buffer, jlong size) { @@ -611,7 +782,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesCbcDecrypt_1fips__Lcom return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesGcmSetKey_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesGcmSetKey_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2J( JNIEnv* env, jclass class, jobject aes_object, jobject key_buffer, jlong size) { @@ -648,7 +819,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesGcmSetKey_1fips__Lcom_ return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesGcmSetKey_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3BJ( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesGcmSetKey_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3BJ( JNIEnv* env, jclass class, jobject aes_object, jbyteArray key_buffer, jlong size) { @@ -689,7 +860,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesGcmSetKey_1fips__Lcom_ return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesGcmEncrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesGcmEncrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2J( JNIEnv* env, jclass class, jobject aes_object, jobject out_buffer, jobject in_buffer, jlong size, jobject iv_buffer, jlong ivSz, jobject authTag_buffer, jlong authTagSz, jobject authIn_buffer, @@ -751,7 +922,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesGcmEncrypt_1fips__Lcom return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesGcmEncrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3B_3BJ_3BJ_3BJ_3BJ( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesGcmEncrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3B_3BJ_3BJ_3BJ_3BJ( JNIEnv* env, jclass class, jobject aes_object, jbyteArray out_buffer, jbyteArray in_buffer, jlong size, jbyteArray iv_buffer, jlong ivSz, jbyteArray authTag_buffer, jlong authTagSz, jbyteArray authIn_buffer, @@ -820,7 +991,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesGcmEncrypt_1fips__Lcom return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesGcmDecrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesGcmDecrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2J( JNIEnv* env, jclass class, jobject aes_object, jobject out_buffer, jobject in_buffer, jlong size, jobject iv_buffer, jlong ivSz, jobject authTag_buffer, jlong authTagSz, jobject authIn_buffer, @@ -880,7 +1051,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesGcmDecrypt_1fips__Lcom return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesGcmDecrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3B_3BJ_3BJ_3BJ_3BJ( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1AesGcmDecrypt_1fips__Lcom_wolfssl_wolfcrypt_Aes_2_3B_3BJ_3BJ_3BJ_3BJ( JNIEnv* env, jclass class, jobject aes_object, jbyteArray out_buffer, jbyteArray in_buffer, jlong size, jbyteArray iv_buffer, jlong ivSz, jbyteArray authTag_buffer, jlong authTagSz, jbyteArray authIn_buffer, @@ -950,7 +1121,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_AesGcmDecrypt_1fips__Lcom /* DES3 */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Des3_1SetKey_1fips__Lcom_wolfssl_wolfcrypt_Des3_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2I( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Des3_1SetKey_1fips__Lcom_wolfssl_wolfcrypt_Des3_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2I( JNIEnv* env, jclass class, jobject des_object, jobject key_buffer, jobject iv_buffer, jint dir) { @@ -990,7 +1161,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Des3_1SetKey_1fips__Lcom_ return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Des3_1SetKey_1fips__Lcom_wolfssl_wolfcrypt_Des3_2_3B_3BI( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Des3_1SetKey_1fips__Lcom_wolfssl_wolfcrypt_Des3_2_3B_3BI( JNIEnv* env, jclass class, jobject des_object, jbyteArray key_buffer, jbyteArray iv_buffer, jint dir) { @@ -1031,7 +1202,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Des3_1SetKey_1fips__Lcom_ return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Des3_1SetIV_1fips__Lcom_wolfssl_wolfcrypt_Des3_2Ljava_nio_ByteBuffer_2( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Des3_1SetIV_1fips__Lcom_wolfssl_wolfcrypt_Des3_2Ljava_nio_ByteBuffer_2( JNIEnv* env, jclass class, jobject des_object, jobject iv_buffer) { jint ret = NOT_COMPILED_IN; @@ -1064,7 +1235,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Des3_1SetIV_1fips__Lcom_w return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Des3_1SetIV_1fips__Lcom_wolfssl_wolfcrypt_Des3_2_3B( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Des3_1SetIV_1fips__Lcom_wolfssl_wolfcrypt_Des3_2_3B( JNIEnv* env, jclass class, jobject des_object, jbyteArray iv_buffer) { jint ret = NOT_COMPILED_IN; @@ -1098,7 +1269,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Des3_1SetIV_1fips__Lcom_w return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Des3_1CbcEncrypt_1fips__Lcom_wolfssl_wolfcrypt_Des3_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Des3_1CbcEncrypt_1fips__Lcom_wolfssl_wolfcrypt_Des3_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2J( JNIEnv* env, jclass class, jobject des_object, jobject out_buffer, jobject in_buffer, jlong size) { @@ -1137,7 +1308,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Des3_1CbcEncrypt_1fips__L return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Des3_1CbcEncrypt_1fips__Lcom_wolfssl_wolfcrypt_Des3_2_3B_3BJ( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Des3_1CbcEncrypt_1fips__Lcom_wolfssl_wolfcrypt_Des3_2_3B_3BJ( JNIEnv* env, jclass class, jobject des_object, jbyteArray out_buffer, jbyteArray in_buffer, jlong size) { @@ -1178,7 +1349,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Des3_1CbcEncrypt_1fips__L return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Des3_1CbcDecrypt_1fips__Lcom_wolfssl_wolfcrypt_Des3_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Des3_1CbcDecrypt_1fips__Lcom_wolfssl_wolfcrypt_Des3_2Ljava_nio_ByteBuffer_2Ljava_nio_ByteBuffer_2J( JNIEnv* env, jclass class, jobject des_object, jobject out_buffer, jobject in_buffer, jlong size) { @@ -1217,7 +1388,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Des3_1CbcDecrypt_1fips__L return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Des3_1CbcDecrypt_1fips__Lcom_wolfssl_wolfcrypt_Des3_2_3B_3BJ( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Des3_1CbcDecrypt_1fips__Lcom_wolfssl_wolfcrypt_Des3_2_3B_3BJ( JNIEnv* env, jclass class, jobject des_object, jbyteArray out_buffer, jbyteArray in_buffer, jlong size) { @@ -1263,7 +1434,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Des3_1CbcDecrypt_1fips__L /* HMAC */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_HmacSetKey_1fips__Lcom_wolfssl_wolfcrypt_Hmac_2ILjava_nio_ByteBuffer_2J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1HmacSetKey_1fips__Lcom_wolfssl_wolfcrypt_Hmac_2ILjava_nio_ByteBuffer_2J( JNIEnv* env, jclass class, jobject hmac_object, jint type, jobject key_buffer, jlong keySz) { @@ -1301,7 +1472,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_HmacSetKey_1fips__Lcom_wo return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_HmacSetKey_1fips__Lcom_wolfssl_wolfcrypt_Hmac_2I_3BJ( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1HmacSetKey_1fips__Lcom_wolfssl_wolfcrypt_Hmac_2I_3BJ( JNIEnv* env, jclass class, jobject hmac_object, jint type, jbyteArray key_buffer, jlong keySz) { @@ -1343,7 +1514,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_HmacSetKey_1fips__Lcom_wo return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_HmacUpdate_1fips__Lcom_wolfssl_wolfcrypt_Hmac_2Ljava_nio_ByteBuffer_2J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1HmacUpdate_1fips__Lcom_wolfssl_wolfcrypt_Hmac_2Ljava_nio_ByteBuffer_2J( JNIEnv* env, jclass class, jobject hmac_object, jobject data_buffer, jlong len) { @@ -1380,7 +1551,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_HmacUpdate_1fips__Lcom_wo return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_HmacUpdate_1fips__Lcom_wolfssl_wolfcrypt_Hmac_2_3BJ( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1HmacUpdate_1fips__Lcom_wolfssl_wolfcrypt_Hmac_2_3BJ( JNIEnv* env, jclass class, jobject hmac_object, jbyteArray data_buffer, jlong len) { @@ -1421,7 +1592,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_HmacUpdate_1fips__Lcom_wo return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_HmacFinal_1fips__Lcom_wolfssl_wolfcrypt_Hmac_2Ljava_nio_ByteBuffer_2( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1HmacFinal_1fips__Lcom_wolfssl_wolfcrypt_Hmac_2Ljava_nio_ByteBuffer_2( JNIEnv* env, jclass class, jobject hmac_object, jobject hash_buffer) { jint ret = NOT_COMPILED_IN; @@ -1455,7 +1626,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_HmacFinal_1fips__Lcom_wol return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_HmacFinal_1fips__Lcom_wolfssl_wolfcrypt_Hmac_2_3B( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1HmacFinal_1fips__Lcom_wolfssl_wolfcrypt_Hmac_2_3B( JNIEnv* env, jclass class, jobject hmac_object, jbyteArray hash_buffer) { jint ret = NOT_COMPILED_IN; @@ -1499,7 +1670,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_HmacFinal_1fips__Lcom_wol /* RNG */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_InitRng_1fips( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1InitRng_1fips( JNIEnv* env, jclass class, jobject rng_object) { jint ret = NOT_COMPILED_IN; @@ -1525,7 +1696,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_InitRng_1fips( return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_FreeRng_1fips( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1FreeRng_1fips( JNIEnv* env, jclass class, jobject rng_object) { jint ret = NOT_COMPILED_IN; @@ -1551,7 +1722,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_FreeRng_1fips( return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RNG_1GenerateBlock_1fips__Lcom_wolfssl_wolfcrypt_Rng_2Ljava_nio_ByteBuffer_2J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RNG_1GenerateBlock_1fips__Lcom_wolfssl_wolfcrypt_Rng_2Ljava_nio_ByteBuffer_2J( JNIEnv* env, jclass class, jobject rng_object, jobject buf_buffer, jlong bufSz) { @@ -1588,7 +1759,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RNG_1GenerateBlock_1fips_ return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RNG_1GenerateBlock_1fips__Lcom_wolfssl_wolfcrypt_Rng_2_3BJ( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RNG_1GenerateBlock_1fips__Lcom_wolfssl_wolfcrypt_Rng_2_3BJ( JNIEnv* env, jclass class, jobject rng_object, jbyteArray buf_buffer, jlong bufSz) { @@ -1629,7 +1800,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RNG_1GenerateBlock_1fips_ return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RNG_1HealthTest_1fips__ILjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RNG_1HealthTest_1fips__ILjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2J( JNIEnv* env, jclass class, jint reseed, jobject entropyA_object, jlong entropyASz, jobject entropyB_object, jlong entropyBSz, jobject output_object, jlong outputSz) @@ -1667,7 +1838,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RNG_1HealthTest_1fips__IL return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RNG_1HealthTest_1fips__I_3BJ_3BJ_3BJ( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RNG_1HealthTest_1fips__I_3BJ_3BJ_3BJ( JNIEnv* env, jclass class, jint reseed, jbyteArray entropyA_object, jlong entropyASz, jbyteArray entropyB_object, jlong entropyBSz, jbyteArray output_object, jlong outputSz) @@ -1717,7 +1888,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RNG_1HealthTest_1fips__I_ /* RSA */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_InitRsaKey_1fips( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1InitRsaKey_1fips( JNIEnv* env, jclass class, jobject rsa_object, jobject heap_object) { jint ret = NOT_COMPILED_IN; @@ -1748,7 +1919,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_InitRsaKey_1fips( return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_FreeRsaKey_1fips( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1FreeRsaKey_1fips( JNIEnv* env, jclass class, jobject rsa_object) { jint ret = NOT_COMPILED_IN; @@ -1774,7 +1945,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_FreeRsaKey_1fips( return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaSSL_1Sign_1fips__Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLcom_wolfssl_wolfcrypt_Rsa_2Lcom_wolfssl_wolfcrypt_Rng_2( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaSSL_1Sign_1fips__Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLcom_wolfssl_wolfcrypt_Rsa_2Lcom_wolfssl_wolfcrypt_Rng_2( JNIEnv* env, jclass class, jobject in_object, jlong inLen, jobject out_object, jlong outLen, jobject rsa_object, jobject rng_object) { @@ -1829,7 +2000,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaSSL_1Sign_1fips__Ljava return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaSSL_1Sign_1fips___3BJ_3BJLcom_wolfssl_wolfcrypt_Rsa_2Lcom_wolfssl_wolfcrypt_Rng_2( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaSSL_1Sign_1fips___3BJ_3BJLcom_wolfssl_wolfcrypt_Rsa_2Lcom_wolfssl_wolfcrypt_Rng_2( JNIEnv* env, jclass class, jbyteArray in_object, jlong inLen, jbyteArray out_object, jlong outLen, jobject rsa_object, jobject rng_object) { @@ -1901,7 +2072,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaSSL_1Sign_1fips___3BJ_ return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaSSL_1Verify_1fips__Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLcom_wolfssl_wolfcrypt_Rsa_2( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaSSL_1Verify_1fips__Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLcom_wolfssl_wolfcrypt_Rsa_2( JNIEnv* env, jclass class, jobject in_object, jlong inLen, jobject out_object, jlong outLen, jobject rsa_object) { @@ -1945,7 +2116,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaSSL_1Verify_1fips__Lja return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaSSL_1Verify_1fips___3BJ_3BJLcom_wolfssl_wolfcrypt_Rsa_2( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaSSL_1Verify_1fips___3BJ_3BJLcom_wolfssl_wolfcrypt_Rsa_2( JNIEnv* env, jclass class, jbyteArray in_object, jlong inLen, jbyteArray out_object, jlong outLen, jobject rsa_object) { @@ -2000,7 +2171,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaSSL_1Verify_1fips___3B return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaEncryptSize_1fips( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaEncryptSize_1fips( JNIEnv* env, jclass class, jobject rsa_object) { jint ret = NOT_COMPILED_IN; @@ -2026,7 +2197,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaEncryptSize_1fips( return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaPrivateKeyDecode_1fips__Ljava_nio_ByteBuffer_2_3JLcom_wolfssl_wolfcrypt_Rsa_2J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaPrivateKeyDecode_1fips__Ljava_nio_ByteBuffer_2_3JLcom_wolfssl_wolfcrypt_Rsa_2J( JNIEnv* env, jclass class, jobject input_object, jlongArray inOutIdx, jobject rsa_object, jlong inSz) { @@ -2073,7 +2244,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaPrivateKeyDecode_1fips return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaPrivateKeyDecode_1fips___3B_3JLcom_wolfssl_wolfcrypt_Rsa_2J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaPrivateKeyDecode_1fips___3B_3JLcom_wolfssl_wolfcrypt_Rsa_2J( JNIEnv* env, jclass class, jbyteArray input_object, jlongArray inOutIdx, jobject rsa_object, jlong inSz) { @@ -2124,7 +2295,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaPrivateKeyDecode_1fips return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaPublicKeyDecode_1fips__Ljava_nio_ByteBuffer_2_3JLcom_wolfssl_wolfcrypt_Rsa_2J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaPublicKeyDecode_1fips__Ljava_nio_ByteBuffer_2_3JLcom_wolfssl_wolfcrypt_Rsa_2J( JNIEnv* env, jclass class, jobject input_object, jlongArray inOutIdx, jobject rsa_object, jlong inSz) { @@ -2170,7 +2341,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaPublicKeyDecode_1fips_ return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaPublicKeyDecode_1fips___3B_3JLcom_wolfssl_wolfcrypt_Rsa_2J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaPublicKeyDecode_1fips___3B_3JLcom_wolfssl_wolfcrypt_Rsa_2J( JNIEnv* env, jclass class, jbyteArray input_object, jlongArray inOutIdx, jobject rsa_object, jlong inSz) { @@ -2226,7 +2397,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaPublicKeyDecode_1fips_ /* SHA */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_InitSha_1fips( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1InitSha_1fips( JNIEnv* env, jclass class, jobject sha_object) { jint ret = NOT_COMPILED_IN; @@ -2249,7 +2420,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_InitSha_1fips( return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ShaUpdate_1fips__Lcom_wolfssl_wolfcrypt_Sha_2Ljava_nio_ByteBuffer_2J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ShaUpdate_1fips__Lcom_wolfssl_wolfcrypt_Sha_2Ljava_nio_ByteBuffer_2J( JNIEnv* env, jclass class, jobject sha_object, jobject data_buffer, jlong len) { @@ -2284,7 +2455,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ShaUpdate_1fips__Lcom_wol return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ShaUpdate_1fips__Lcom_wolfssl_wolfcrypt_Sha_2_3BJ( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ShaUpdate_1fips__Lcom_wolfssl_wolfcrypt_Sha_2_3BJ( JNIEnv* env, jclass class, jobject sha_object, jbyteArray data_buffer, jlong len) { @@ -2324,7 +2495,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ShaUpdate_1fips__Lcom_wol return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ShaFinal_1fips__Lcom_wolfssl_wolfcrypt_Sha_2Ljava_nio_ByteBuffer_2( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ShaFinal_1fips__Lcom_wolfssl_wolfcrypt_Sha_2Ljava_nio_ByteBuffer_2( JNIEnv* env, jclass class, jobject sha_object, jobject hash_buffer) { jint ret = NOT_COMPILED_IN; @@ -2358,7 +2529,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ShaFinal_1fips__Lcom_wolf return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ShaFinal_1fips__Lcom_wolfssl_wolfcrypt_Sha_2_3B( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ShaFinal_1fips__Lcom_wolfssl_wolfcrypt_Sha_2_3B( JNIEnv* env, jclass class, jobject sha_object, jbyteArray hash_buffer) { jint ret = NOT_COMPILED_IN; @@ -2399,7 +2570,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ShaFinal_1fips__Lcom_wolf /* SHA256 */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_InitSha256_1fips( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1InitSha256_1fips( JNIEnv* env, jclass class, jobject sha_object) { jint ret = NOT_COMPILED_IN; @@ -2422,7 +2593,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_InitSha256_1fips( return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha256Update_1fips__Lcom_wolfssl_wolfcrypt_Sha256_2Ljava_nio_ByteBuffer_2J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Sha256Update_1fips__Lcom_wolfssl_wolfcrypt_Sha256_2Ljava_nio_ByteBuffer_2J( JNIEnv* env, jclass class, jobject sha_object, jobject data_buffer, jlong len) { @@ -2457,7 +2628,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha256Update_1fips__Lcom_ return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha256Update_1fips__Lcom_wolfssl_wolfcrypt_Sha256_2_3BJ( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Sha256Update_1fips__Lcom_wolfssl_wolfcrypt_Sha256_2_3BJ( JNIEnv* env, jclass class, jobject sha_object, jbyteArray data_buffer, jlong len) { @@ -2497,7 +2668,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha256Update_1fips__Lcom_ return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha256Final_1fips__Lcom_wolfssl_wolfcrypt_Sha256_2Ljava_nio_ByteBuffer_2( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Sha256Final_1fips__Lcom_wolfssl_wolfcrypt_Sha256_2Ljava_nio_ByteBuffer_2( JNIEnv* env, jclass class, jobject sha_object, jobject hash_buffer) { jint ret = NOT_COMPILED_IN; @@ -2531,7 +2702,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha256Final_1fips__Lcom_w return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha256Final_1fips__Lcom_wolfssl_wolfcrypt_Sha256_2_3B( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Sha256Final_1fips__Lcom_wolfssl_wolfcrypt_Sha256_2_3B( JNIEnv* env, jclass class, jobject sha_object, jbyteArray hash_buffer) { jint ret = NOT_COMPILED_IN; @@ -2572,7 +2743,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha256Final_1fips__Lcom_w /* SHA384 */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_InitSha384_1fips( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1InitSha384_1fips( JNIEnv* env, jclass class, jobject sha_object) { jint ret = NOT_COMPILED_IN; @@ -2595,7 +2766,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_InitSha384_1fips( return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha384Update_1fips__Lcom_wolfssl_wolfcrypt_Sha384_2Ljava_nio_ByteBuffer_2J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Sha384Update_1fips__Lcom_wolfssl_wolfcrypt_Sha384_2Ljava_nio_ByteBuffer_2J( JNIEnv* env, jclass class, jobject sha_object, jobject data_buffer, jlong len) { @@ -2630,7 +2801,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha384Update_1fips__Lcom_ return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha384Update_1fips__Lcom_wolfssl_wolfcrypt_Sha384_2_3BJ( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Sha384Update_1fips__Lcom_wolfssl_wolfcrypt_Sha384_2_3BJ( JNIEnv* env, jclass class, jobject sha_object, jbyteArray data_buffer, jlong len) { @@ -2670,7 +2841,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha384Update_1fips__Lcom_ return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha384Final_1fips__Lcom_wolfssl_wolfcrypt_Sha384_2Ljava_nio_ByteBuffer_2( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Sha384Final_1fips__Lcom_wolfssl_wolfcrypt_Sha384_2Ljava_nio_ByteBuffer_2( JNIEnv* env, jclass class, jobject sha_object, jobject hash_buffer) { jint ret = NOT_COMPILED_IN; @@ -2704,7 +2875,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha384Final_1fips__Lcom_w return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha384Final_1fips__Lcom_wolfssl_wolfcrypt_Sha384_2_3B( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Sha384Final_1fips__Lcom_wolfssl_wolfcrypt_Sha384_2_3B( JNIEnv* env, jclass class, jobject sha_object, jbyteArray hash_buffer) { jint ret = NOT_COMPILED_IN; @@ -2745,7 +2916,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha384Final_1fips__Lcom_w /* SHA512 */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_InitSha512_1fips( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1InitSha512_1fips( JNIEnv* env, jclass class, jobject sha_object) { jint ret = NOT_COMPILED_IN; @@ -2768,7 +2939,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_InitSha512_1fips( return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha512Update_1fips__Lcom_wolfssl_wolfcrypt_Sha512_2Ljava_nio_ByteBuffer_2J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Sha512Update_1fips__Lcom_wolfssl_wolfcrypt_Sha512_2Ljava_nio_ByteBuffer_2J( JNIEnv* env, jclass class, jobject sha_object, jobject data_buffer, jlong len) { @@ -2803,7 +2974,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha512Update_1fips__Lcom_ return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha512Update_1fips__Lcom_wolfssl_wolfcrypt_Sha512_2_3BJ( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Sha512Update_1fips__Lcom_wolfssl_wolfcrypt_Sha512_2_3BJ( JNIEnv* env, jclass class, jobject sha_object, jbyteArray data_buffer, jlong len) { @@ -2843,7 +3014,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha512Update_1fips__Lcom_ return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha512Final_1fips__Lcom_wolfssl_wolfcrypt_Sha512_2Ljava_nio_ByteBuffer_2( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Sha512Final_1fips__Lcom_wolfssl_wolfcrypt_Sha512_2Ljava_nio_ByteBuffer_2( JNIEnv* env, jclass class, jobject sha_object, jobject hash_buffer) { jint ret = NOT_COMPILED_IN; @@ -2877,7 +3048,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha512Final_1fips__Lcom_w return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Sha512Final_1fips__Lcom_wolfssl_wolfcrypt_Sha512_2_3B( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Sha512Final_1fips__Lcom_wolfssl_wolfcrypt_Sha512_2_3B( JNIEnv* env, jclass class, jobject sha_object, jbyteArray hash_buffer) { jint ret = NOT_COMPILED_IN; @@ -2948,7 +3119,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wolfCrypt_1SetStatus_1fip * wolfCrypt FIPS API - Key transport Service */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaPublicEncrypt_1fips__Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLcom_wolfssl_wolfcrypt_Rsa_2Lcom_wolfssl_wolfcrypt_Rng_2( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaPublicEncrypt_1fips__Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLcom_wolfssl_wolfcrypt_Rsa_2Lcom_wolfssl_wolfcrypt_Rng_2( JNIEnv* env, jclass class, jobject in_object, jlong inLen, jobject out_object, jlong outLen, jobject rsa_object, jobject rng_object) { @@ -3002,7 +3173,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaPublicEncrypt_1fips__L return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaPublicEncrypt_1fips___3BJ_3BJLcom_wolfssl_wolfcrypt_Rsa_2Lcom_wolfssl_wolfcrypt_Rng_2( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaPublicEncrypt_1fips___3BJ_3BJLcom_wolfssl_wolfcrypt_Rsa_2Lcom_wolfssl_wolfcrypt_Rng_2( JNIEnv* env, jclass class, jbyteArray in_object, jlong inLen, jbyteArray out_object, jlong outLen, jobject rsa_object, jobject rng_object) { @@ -3061,7 +3232,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaPublicEncrypt_1fips___ return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaPrivateDecrypt_1fips__Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLcom_wolfssl_wolfcrypt_Rsa_2( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaPrivateDecrypt_1fips__Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2JLcom_wolfssl_wolfcrypt_Rsa_2( JNIEnv* env, jclass class, jobject in_object, jlong inLen, jobject out_object, jlong outLen, jobject rsa_object) { @@ -3104,7 +3275,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaPrivateDecrypt_1fips__ return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaPrivateDecrypt_1fips___3BJ_3BJLcom_wolfssl_wolfcrypt_Rsa_2( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1RsaPrivateDecrypt_1fips___3BJ_3BJLcom_wolfssl_wolfcrypt_Rsa_2( JNIEnv* env, jclass class, jbyteArray in_object, jlong inLen, jbyteArray out_object, jlong outLen, jobject rsa_object) { @@ -3156,7 +3327,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_RsaPrivateDecrypt_1fips__ * wolfCrypt FIPS API - Message digest MD5 Service */ -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_InitMd5_1fips( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1InitMd5_1fips( JNIEnv* env, jclass class, jobject md5_object) { jint ret = NOT_COMPILED_IN; @@ -3176,7 +3347,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_InitMd5_1fips( return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Md5Update__Lcom_wolfssl_wolfcrypt_Md5_2Ljava_nio_ByteBuffer_2J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Md5Update__Lcom_wolfssl_wolfcrypt_Md5_2Ljava_nio_ByteBuffer_2J( JNIEnv* env, jclass class, jobject md5_object, jobject data_buffer, jlong len) { @@ -3208,7 +3379,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Md5Update__Lcom_wolfssl_w return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Md5Update__Lcom_wolfssl_wolfcrypt_Md5_2_3BJ( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Md5Update__Lcom_wolfssl_wolfcrypt_Md5_2_3BJ( JNIEnv* env, jclass class, jobject md5_object, jbyteArray data_buffer, jlong len) { @@ -3243,7 +3414,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Md5Update__Lcom_wolfssl_w return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Md5Final__Lcom_wolfssl_wolfcrypt_Md5_2Ljava_nio_ByteBuffer_2( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Md5Final__Lcom_wolfssl_wolfcrypt_Md5_2Ljava_nio_ByteBuffer_2( JNIEnv* env, jclass class, jobject md5_object, jobject hash_buffer) { jint ret = NOT_COMPILED_IN; @@ -3274,7 +3445,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Md5Final__Lcom_wolfssl_wo return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Md5Final__Lcom_wolfssl_wolfcrypt_Md5_2_3B( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1Md5Final__Lcom_wolfssl_wolfcrypt_Md5_2_3B( JNIEnv* env, jclass class, jobject md5_object, jbyteArray hash_buffer) { jint ret = NOT_COMPILED_IN; @@ -3312,7 +3483,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_Md5Final__Lcom_wolfssl_wo * wolfCrypt FIPS API - Key agreement Service */ -JNIEXPORT void JNICALL Java_com_wolfssl_wolfcrypt_Fips_InitDhKey( +JNIEXPORT void JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1InitDhKey( JNIEnv* env, jclass class, jobject key_object) { #if defined(HAVE_FIPS) && !defined(NO_DH) @@ -3327,7 +3498,7 @@ JNIEXPORT void JNICALL Java_com_wolfssl_wolfcrypt_Fips_InitDhKey( #endif } -JNIEXPORT void JNICALL Java_com_wolfssl_wolfcrypt_Fips_FreeDhKey( +JNIEXPORT void JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1FreeDhKey( JNIEnv* env, jclass class, jobject key_object) { #if defined(HAVE_FIPS) && !defined(NO_DH) @@ -3342,7 +3513,7 @@ JNIEXPORT void JNICALL Java_com_wolfssl_wolfcrypt_Fips_FreeDhKey( #endif } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhGenerateKeyPair__Lcom_wolfssl_wolfcrypt_Dh_2Lcom_wolfssl_wolfcrypt_Rng_2Ljava_nio_ByteBuffer_2_3JLjava_nio_ByteBuffer_2_3J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1DhGenerateKeyPair__Lcom_wolfssl_wolfcrypt_Dh_2Lcom_wolfssl_wolfcrypt_Rng_2Ljava_nio_ByteBuffer_2_3JLjava_nio_ByteBuffer_2_3J( JNIEnv* env, jclass class, jobject key_object, jobject rng_object, jobject priv_buffer, jlongArray privSz, jobject pub_buffer, jlongArray pubSz) @@ -3406,7 +3577,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhGenerateKeyPair__Lcom_w return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhGenerateKeyPair__Lcom_wolfssl_wolfcrypt_Dh_2Lcom_wolfssl_wolfcrypt_Rng_2_3B_3J_3B_3J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1DhGenerateKeyPair__Lcom_wolfssl_wolfcrypt_Dh_2Lcom_wolfssl_wolfcrypt_Rng_2_3B_3J_3B_3J( JNIEnv* env, jclass class, jobject key_object, jobject rng_object, jbyteArray priv_buffer, jlongArray privSz, jbyteArray pub_buffer, jlongArray pubSz) @@ -3473,7 +3644,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhGenerateKeyPair__Lcom_w return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhAgree__Lcom_wolfssl_wolfcrypt_Dh_2Ljava_nio_ByteBuffer_2_3JLjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1DhAgree__Lcom_wolfssl_wolfcrypt_Dh_2Ljava_nio_ByteBuffer_2_3JLjava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2J( JNIEnv* env, jclass class, jobject key_object, jobject agree_buffer, jlongArray agreeSz, jobject priv_buffer, jlong privSz, jobject pub_buffer, jlong pubSz) @@ -3524,7 +3695,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhAgree__Lcom_wolfssl_wol return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhAgree__Lcom_wolfssl_wolfcrypt_Dh_2_3B_3J_3BJ_3BJ( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1DhAgree__Lcom_wolfssl_wolfcrypt_Dh_2_3B_3J_3BJ_3BJ( JNIEnv* env, jclass class, jobject key_object, jbyteArray agree_buffer, jlongArray agreeSz, jbyteArray priv_buffer, jlong privSz, jbyteArray pub_buffer, jlong pubSz) @@ -3578,7 +3749,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhAgree__Lcom_wolfssl_wol return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhKeyDecode__Ljava_nio_ByteBuffer_2_3JLcom_wolfssl_wolfcrypt_Dh_2J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1DhKeyDecode__Ljava_nio_ByteBuffer_2_3JLcom_wolfssl_wolfcrypt_Dh_2J( JNIEnv* env, jclass class, jobject input_buffer, jlongArray inOutIdx, jobject key_object, jlong inSz) { @@ -3617,7 +3788,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhKeyDecode__Ljava_nio_By return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhKeyDecode___3B_3JLcom_wolfssl_wolfcrypt_Dh_2J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1DhKeyDecode___3B_3JLcom_wolfssl_wolfcrypt_Dh_2J( JNIEnv* env, jclass class, jbyteArray input_buffer, jlongArray inOutIdx, jobject key_object, jlong inSz) { @@ -3657,7 +3828,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhKeyDecode___3B_3JLcom_w return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhSetKey__Lcom_wolfssl_wolfcrypt_Dh_2Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1DhSetKey__Lcom_wolfssl_wolfcrypt_Dh_2Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2J( JNIEnv* env, jclass class, jobject key_object, jobject p_buffer, jlong pSz, jobject g_buffer, jlong gSz) { @@ -3693,7 +3864,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhSetKey__Lcom_wolfssl_wo return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhSetKey__Lcom_wolfssl_wolfcrypt_Dh_2_3BJ_3BJ( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1DhSetKey__Lcom_wolfssl_wolfcrypt_Dh_2_3BJ_3BJ( JNIEnv* env, jclass class, jobject key_object, jbyteArray p_buffer, jlong pSz, jbyteArray g_buffer, jlong gSz) { @@ -3731,7 +3902,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhSetKey__Lcom_wolfssl_wo return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhParamsLoad__Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2_3JLjava_nio_ByteBuffer_2_3J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1DhParamsLoad__Ljava_nio_ByteBuffer_2JLjava_nio_ByteBuffer_2_3JLjava_nio_ByteBuffer_2_3J( JNIEnv* env, jclass class, jobject input_buffer, jlong inSz, jobject p_buffer, jlongArray pInOutSz, jobject g_buffer, jlongArray gInOutSz) @@ -3781,7 +3952,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhParamsLoad__Ljava_nio_B return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhParamsLoad___3BJ_3B_3J_3B_3J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1DhParamsLoad___3BJ_3B_3J_3B_3J( JNIEnv* env, jclass class, jbyteArray input_buffer, jlong inSz, jbyteArray p_buffer, jlongArray pInOutSz, jbyteArray g_buffer, jlongArray gInOutSz) @@ -3841,7 +4012,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_DhParamsLoad___3BJ_3B_3J_ return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1init +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ecc_1init (JNIEnv* env, jclass class, jobject key_object) { jint ret = NOT_COMPILED_IN; @@ -3863,7 +4034,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1init } -JNIEXPORT void JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1free( +JNIEXPORT void JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ecc_1free( JNIEnv *env, jclass class, jobject key_object) { #if defined(HAVE_FIPS) && defined(HAVE_ECC) @@ -3880,7 +4051,7 @@ JNIEXPORT void JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1free( #endif } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1make_1key( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ecc_1make_1key( JNIEnv* env, jclass class, jobject rng_object, jint keysize, jobject key_object) { @@ -3911,7 +4082,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1make_1key( return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1shared_1secret__Lcom_wolfssl_wolfcrypt_Ecc_2Lcom_wolfssl_wolfcrypt_Ecc_2Ljava_nio_ByteBuffer_2_3J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ecc_1shared_1secret__Lcom_wolfssl_wolfcrypt_Ecc_2Lcom_wolfssl_wolfcrypt_Ecc_2Ljava_nio_ByteBuffer_2_3J( JNIEnv* env, jclass class, jobject priv_object, jobject pub_object, jobject out_buffer, jlongArray outlen) { @@ -3957,7 +4128,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1shared_1secret__Lcom return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1shared_1secret__Lcom_wolfssl_wolfcrypt_Ecc_2Lcom_wolfssl_wolfcrypt_Ecc_2_3B_3J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ecc_1shared_1secret__Lcom_wolfssl_wolfcrypt_Ecc_2Lcom_wolfssl_wolfcrypt_Ecc_2_3B_3J( JNIEnv* env, jclass class, jobject priv_object, jobject pub_object, jbyteArray out_buffer, jlongArray outlen) { @@ -4008,7 +4179,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1shared_1secret__Lcom return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1import_1x963__Ljava_nio_ByteBuffer_2JLcom_wolfssl_wolfcrypt_Ecc_2( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ecc_1import_1x963__Ljava_nio_ByteBuffer_2JLcom_wolfssl_wolfcrypt_Ecc_2( JNIEnv* env, jclass class, jobject in_buffer, jlong inLen, jobject key_object) { @@ -4039,7 +4210,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1import_1x963__Ljava_ return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1import_1x963___3BJLcom_wolfssl_wolfcrypt_Ecc_2( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ecc_1import_1x963___3BJLcom_wolfssl_wolfcrypt_Ecc_2( JNIEnv* env, jclass class, jbyteArray in_buffer, jlong inLen, jobject key_object) { @@ -4071,7 +4242,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1import_1x963___3BJLc return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1export_1x963__Lcom_wolfssl_wolfcrypt_Ecc_2Ljava_nio_ByteBuffer_2_3J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ecc_1export_1x963__Lcom_wolfssl_wolfcrypt_Ecc_2Ljava_nio_ByteBuffer_2_3J( JNIEnv* env, jclass class, jobject key_object, jobject out_buffer, jlongArray outLen) { @@ -4110,7 +4281,7 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1export_1x963__Lcom_w return ret; } -JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_ecc_1export_1x963__Lcom_wolfssl_wolfcrypt_Ecc_2_3B_3J( +JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_Fips_wc_1ecc_1export_1x963__Lcom_wolfssl_wolfcrypt_Ecc_2_3B_3J( JNIEnv* env, jclass class, jobject key_object, jbyteArray out_buffer, jlongArray outLen) { diff --git a/jni/jni_wolfobject.c b/jni/jni_wolfobject.c index 48b7460..e9a484a 100644 --- a/jni/jni_wolfobject.c +++ b/jni/jni_wolfobject.c @@ -40,152 +40,13 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_WolfObject_init (void)jenv; (void)jcl; - int ret = 0; - -#ifdef WC_RNG_SEED_CB - ret = wc_SetSeed_Cb(wc_GenerateSeed); - if (ret != 0) { - printf("wc_SetSeed_Cb() failed"); - } -#endif - -#if defined(HAVE_FIPS) && defined(HAVE_FIPS_VERSION) && \ - (HAVE_FIPS_VERSION >= 7) - - ret = wc_RunAllCast_fips(); - if (ret != 0) { - printf("FIPS CASTs failed to run"); - } - -#elif defined(HAVE_FIPS) && defined(HAVE_FIPS_VERSION) && \ - (HAVE_FIPS_VERSION == 5) - - /* run FIPS 140-3 conditional algorithm self tests early to prevent - * multi threaded issues later on */ -#if !defined(NO_AES) && !defined(NO_AES_CBC) - if (ret == 0) { - ret = wc_RunCast_fips(FIPS_CAST_AES_CBC); - if (ret != 0) { - printf("AES-CBC CAST failed"); - } - } -#endif -#ifdef HAVE_AESGCM - if (ret == 0) { - ret = wc_RunCast_fips(FIPS_CAST_AES_GCM); - if (ret != 0) { - printf("AES-GCM CAST failed"); - } - } -#endif -#ifndef NO_SHA - if (ret == 0) { - ret = wc_RunCast_fips(FIPS_CAST_HMAC_SHA1); - if (ret != 0) { - printf("HMAC-SHA1 CAST failed"); - } - } -#endif - /* the only non-optional CAST */ - if (ret == 0) { - ret = wc_RunCast_fips(FIPS_CAST_HMAC_SHA2_256); - if (ret != 0) { - printf("HMAC-SHA2-256 CAST failed"); - } - } -#ifdef WOLFSSL_SHA512 - if (ret == 0) { - ret = wc_RunCast_fips(FIPS_CAST_HMAC_SHA2_512); - if (ret != 0) { - printf("HMAC-SHA2-512 CAST failed"); - } - } -#endif -#ifdef WOLFSSL_SHA3 - if (ret == 0) { - ret = wc_RunCast_fips(FIPS_CAST_HMAC_SHA3_256); - if (ret != 0) { - printf("HMAC-SHA3-256 CAST failed"); - } - } -#endif -#ifdef HAVE_HASHDRBG - if (ret == 0) { - ret = wc_RunCast_fips(FIPS_CAST_DRBG); - if (ret != 0) { - printf("Hash_DRBG CAST failed"); - } - } -#endif -#ifndef NO_RSA - if (ret == 0) { - ret = wc_RunCast_fips(FIPS_CAST_RSA_SIGN_PKCS1v15); - if (ret != 0) { - printf("RSA sign CAST failed"); - } - } -#endif -#if defined(HAVE_ECC_CDH) && defined(HAVE_ECC_CDH_CAST) - if (ret == 0) { - ret = wc_RunCast_fips(FIPS_CAST_ECC_CDH); - if (ret != 0) { - printf("ECC CDH CAST failed"); - } - } -#endif -#ifdef HAVE_ECC_DHE - if (ret == 0) { - ret = wc_RunCast_fips(FIPS_CAST_ECC_PRIMITIVE_Z); - if (ret != 0) { - printf("ECC Primitive Z CAST failed"); - } - } -#endif -#ifdef HAVE_ECC - if (ret == 0) { - ret = wc_RunCast_fips(FIPS_CAST_ECDSA); - if (ret != 0) { - printf("ECDSA CAST failed"); - } - } -#endif -#ifndef NO_DH - if (ret == 0) { - ret = wc_RunCast_fips(FIPS_CAST_DH_PRIMITIVE_Z); - if (ret != 0) { - printf("DH Primitive Z CAST failed"); - } - } -#endif -#ifdef WOLFSSL_HAVE_PRF - if (ret == 0) { - ret = wc_RunCast_fips(FIPS_CAST_KDF_TLS12); - if (ret != 0) { - printf("KDF TLSv1.2 CAST failed"); - } - } -#endif -#if defined(WOLFSSL_HAVE_PRF) && defined(WOLFSSL_TLS13) - if (ret == 0) { - ret = wc_RunCast_fips(FIPS_CAST_KDF_TLS13); - if (ret != 0) { - printf("KDF TLSv1.3 CAST failed"); - } - } -#endif -#ifdef WOLFSSL_WOLFSSH - if (ret == 0) { - ret = wc_RunCast_fips(FIPS_CAST_KDF_SSH); - if (ret != 0) { - printf("KDF SSHv2.0 CAST failed"); - } - } -#endif -#endif /* HAVE_FIPS && HAVE_FIPS_VERSION == 5 */ - - if (ret < 0) { - return ret; - } + /* Code which runs the FIPS CASTs up front has been moved to the + * com.wolfssl.wolfcrypt.Fips.runAllCast_fips() method. runAllCast_fips() + * includes a synchronized check that only runs the CASTs once as long + * as they were successful. Fips.runAllCast_fips() is called at both + * the JNI-only level (WolfObject.init()), and the JCE level + * (WolfCryptProvider constructor). Both of these runAllCast_fips() + * at JNI/JCE levels are called before this wolfCrypt_Init() below. */ return (jint)wolfCrypt_Init(); } diff --git a/src/main/java/com/wolfssl/provider/jce/WolfCryptProvider.java b/src/main/java/com/wolfssl/provider/jce/WolfCryptProvider.java index c2e53c8..6d04b80 100644 --- a/src/main/java/com/wolfssl/provider/jce/WolfCryptProvider.java +++ b/src/main/java/com/wolfssl/provider/jce/WolfCryptProvider.java @@ -60,6 +60,11 @@ private void registerServices() { String mapJksToWks = null; String mapPkcs12ToWks = null; + /* Run FIPS algorithm self tests (CASTs) if needed */ + if (Fips.enabled) { + Fips.runAllCast_fips(); + } + /* MessageDigest */ if (FeatureDetect.Md5Enabled()) { put("MessageDigest.MD5", diff --git a/src/main/java/com/wolfssl/wolfcrypt/Fips.java b/src/main/java/com/wolfssl/wolfcrypt/Fips.java index 4ab8603..0412269 100644 --- a/src/main/java/com/wolfssl/wolfcrypt/Fips.java +++ b/src/main/java/com/wolfssl/wolfcrypt/Fips.java @@ -22,7 +22,6 @@ package com.wolfssl.wolfcrypt; import java.nio.ByteBuffer; - import com.wolfssl.wolfcrypt.Aes; /** @@ -52,6 +51,13 @@ public class Fips extends WolfObject { /** Native wolfCrypt FIPS version (HAVE_FIPS_VERSION) */ public static final int fipsVersion = Fips.getFipsVersion(); + /* Internal flag to keep track of if FIPS CAST has already been run and + * passed successfully. */ + private static volatile boolean fipsCastRunSuccessfully = false; + + /* Lock around fipsCastRunSuccessfully */ + private static final Object fipsCastLock = new Object(); + private Fips() { } @@ -119,554 +125,823 @@ public interface ErrorCallback { */ public static native int getPrivateKeyReadEnable(int keyType); - private static native int getFipsVersion(); + /** + * Native JNI wrapper around running FIPS CASTs. + * + * Called by public runAllCast_fips() in this class. + * + * @return 0 on success, otherwise greater than zero if some algorithm + * self tests have failed. The count of tests failed will be + * returned on error. + */ + private static native int wc_runAllCast_fips(); - /* - * ### FIPS Approved Security Methods ###################################### + /** + * Run all FIPS Conditional Algorithm Self Tests (CAST). + * + * In wolfCrypt FIPS 140-3, the algorithm self tests are Conditional (CAST), + * meaning they will run on-demand per algorithm the first time that + * algorithm is used. This can be convienent for startup time if on a + * single threaded application, but can introduce potentially unwanted + * errors at runtime if operating in a multi threaded environment where + * multiple threads will be using wolfCrypt cryptography in parallel. If + * one thread is actively running an algorithm CAST and another thread + * tries to use the algorithm, it may return a FIPS not allowed error. + * + * To avoid multi threaded errors at runtime due to the above, this method + * can be called once up front when an application starts. It will run + * all algorithm CASTS, and if run before threaded operations start will + * avoid the FIPS not allowed errors which may occur otherwise. + * + * @return 0 on success, otherwise greater than zero if some algorithm + * self tests have failed. The count of tests failed will be + * returned on error. */ + public static int runAllCast_fips() { - /* - * wolfCrypt FIPS API - Symmetric encrypt/decrypt Service + int ret = 0; + + synchronized (fipsCastLock) { + if (!fipsCastRunSuccessfully) { + ret = wc_runAllCast_fips(); + if (ret == 0) { + /* Only forcefully run FIPS CAST once */ + fipsCastRunSuccessfully = true; + } + } + } + + return ret; + } + + /* wolfCrypt FIPS API - Show status Service */ + + /** + * Returns the current status of the wolfCrypt FIPS module. + * @return A return code of 0 means the module is in a state without + * errors. Any other return code is the specific error state of + * the module. */ + public static native int wolfCrypt_GetStatus_fips(); + + /** + * Sets the fips module status. Only available if HAVE_FORCE_FIPS_FAILURE is + * defined on the native library. + * + * @param status + * the new status. + * @return 0 on success, {@literal <} 0 on error. + */ + public static native int wolfCrypt_SetStatus_fips(int status); + + private static native int getFipsVersion(); + + /* -----------------------------------------------------------------------*/ + /* Private JNI methods, called by public methods in this class */ + /* -----------------------------------------------------------------------*/ + private static native int wc_AesSetKey_fips(Aes aes, ByteBuffer userKey, + long keylen, ByteBuffer iv, int dir); + private static native int wc_AesSetKey_fips(Aes aes, byte[] userKey, + long keylen, byte[] iv, int dir); + private static native int wc_AesSetIV_fips(Aes aes, ByteBuffer iv); + private static native int wc_AesSetIV_fips(Aes aes, byte[] iv); + + private static native int wc_AesCbcEncrypt_fips(Aes aes, ByteBuffer out, + ByteBuffer in, long sz); + private static native int wc_AesCbcEncrypt_fips(Aes aes, byte[] out, + byte[] in, long sz); + private static native int wc_AesCbcDecrypt_fips(Aes aes, ByteBuffer out, + ByteBuffer in, long sz); + private static native int wc_AesCbcDecrypt_fips(Aes aes, byte[] out, + byte[] in, long sz); + + private static native int wc_AesGcmSetKey_fips(Aes aes, ByteBuffer userKey, + long keylen); + private static native int wc_AesGcmSetKey_fips(Aes aes, byte[] userKey, + long keylen); + private static native int wc_AesGcmSetExtIV_fips(Aes aes, ByteBuffer iv, + long ivlen); + private static native int wc_AesGcmSetExtIV_fips(Aes aes, byte[] iv, + long ivlen); + private static native int wc_AesGcmEncrypt_fips(Aes aes, ByteBuffer out, + ByteBuffer in, long sz, ByteBuffer iv, long ivSz, ByteBuffer authTag, + long authTagSz, ByteBuffer authIn, long authInSz); + private static native int wc_AesGcmEncrypt_fips(Aes aes, byte[] out, + byte[] in, long sz, byte[] iv, long ivSz, byte[] authTag, + long authTagSz, byte[] authIn, long authInSz); + private static native int wc_AesGcmDecrypt_fips(Aes aes, ByteBuffer out, + ByteBuffer in, long sz, ByteBuffer iv, long ivSz, ByteBuffer authTag, + long authTagSz, ByteBuffer authIn, long authInSz); + private static native int wc_AesGcmDecrypt_fips(Aes aes, byte[] out, + byte[] in, long sz, byte[] iv, long ivSz, byte[] authTag, + long authTagSz, byte[] authIn, long authInSz); + + private static native int wc_Des3_SetKey_fips(Des3 des, ByteBuffer userKey, + ByteBuffer iv, int dir); + private static native int wc_Des3_SetKey_fips(Des3 des, byte[] userKey, + byte[] iv, int dir); + private static native int wc_Des3_SetIV_fips(Des3 des, ByteBuffer iv); + private static native int wc_Des3_SetIV_fips(Des3 des, byte[] iv); + private static native int wc_Des3_CbcEncrypt_fips(Des3 des, ByteBuffer out, + ByteBuffer in, long sz); + private static native int wc_Des3_CbcEncrypt_fips(Des3 des, byte[] out, + byte[] in, long sz); + private static native int wc_Des3_CbcDecrypt_fips(Des3 des, ByteBuffer out, + ByteBuffer in, long sz); + private static native int wc_Des3_CbcDecrypt_fips(Des3 des, byte[] out, + byte[] in, long sz); + + private static native int wc_HmacSetKey_fips(Hmac hmac, int type, + ByteBuffer key, long keySz); + private static native int wc_HmacSetKey_fips(Hmac hmac, int type, + byte[] key, long keySz); + private static native int wc_HmacUpdate_fips(Hmac hmac, ByteBuffer data, + long len); + private static native int wc_HmacUpdate_fips(Hmac hmac, byte[] data, + long len); + private static native int wc_HmacFinal_fips(Hmac hmac, ByteBuffer hash); + private static native int wc_HmacFinal_fips(Hmac hmac, byte[] hash); + + private static native int wc_InitRng_fips(Rng rng); + private static native int wc_FreeRng_fips(Rng rng); + private static native int wc_RNG_GenerateBlock_fips(Rng rng, ByteBuffer buf, + long bufSz); + private static native int wc_RNG_GenerateBlock_fips(Rng rng, byte[] buf, + long bufSz); + private static native int wc_RNG_HealthTest_fips(int reseed, + ByteBuffer entropyA, long entropyASz, ByteBuffer entropyB, + long entropyBSz, ByteBuffer output, long outputSz); + private static native int wc_RNG_HealthTest_fips(int reseed, + byte[] entropyA, long entropyASz, byte[] entropyB, long entropyBSz, + byte[] output, long outputSz); + + private static native int wc_InitRsaKey_fips(Rsa key, ByteBuffer heap); + private static native int wc_FreeRsaKey_fips(Rsa key); + private static native int wc_RsaSSL_Sign_fips(ByteBuffer in, long inLen, + ByteBuffer out, long outLen, Rsa key, Rng rng); + private static native int wc_RsaSSL_Sign_fips(byte[] in, long inLen, + byte[] out, long outLen, Rsa key, Rng rng); + private static native int wc_RsaSSL_Verify_fips(ByteBuffer in, long inLen, + ByteBuffer out, long outLen, Rsa key); + private static native int wc_RsaSSL_Verify_fips(byte[] in, long inLen, + byte[] out, long outLen, Rsa key); + private static native int wc_RsaEncryptSize_fips(Rsa key); + private static native int wc_RsaPrivateKeyDecode_fips(ByteBuffer input, + long[] inOutIdx, Rsa key, long inSz); + private static native int wc_RsaPrivateKeyDecode_fips(byte[] input, + long[] inOutIdx, Rsa key, long inSz); + private static native int wc_RsaPublicKeyDecode_fips(ByteBuffer input, + long[] inOutIdx, Rsa key, long inSz); + private static native int wc_RsaPublicKeyDecode_fips(byte[] input, + long[] inOutIdx, Rsa key, long inSz); + + private static native int wc_InitSha_fips(Sha sha); + private static native int wc_ShaUpdate_fips(Sha sha, ByteBuffer data, + long len); + private static native int wc_ShaUpdate_fips(Sha sha, byte[] data, + long len); + private static native int wc_ShaFinal_fips(Sha sha, ByteBuffer hash); + private static native int wc_ShaFinal_fips(Sha sha, byte[] hash); + + private static native int wc_InitSha256_fips(Sha256 sha); + private static native int wc_Sha256Update_fips(Sha256 sha, ByteBuffer data, + long len); + private static native int wc_Sha256Update_fips(Sha256 sha, byte[] data, + long len); + private static native int wc_Sha256Final_fips(Sha256 sha, ByteBuffer hash); + private static native int wc_Sha256Final_fips(Sha256 sha, byte[] hash); + + private static native int wc_InitSha384_fips(Sha384 sha); + private static native int wc_Sha384Update_fips(Sha384 sha, ByteBuffer data, + long len); + private static native int wc_Sha384Update_fips(Sha384 sha, byte[] data, + long len); + private static native int wc_Sha384Final_fips(Sha384 sha, ByteBuffer hash); + private static native int wc_Sha384Final_fips(Sha384 sha, byte[] hash); + + private static native int wc_InitSha512_fips(Sha512 sha); + private static native int wc_Sha512Update_fips(Sha512 sha, ByteBuffer data, + long len); + private static native int wc_Sha512Update_fips(Sha512 sha, byte[] data, + long len); + private static native int wc_Sha512Final_fips(Sha512 sha, ByteBuffer hash); + private static native int wc_Sha512Final_fips(Sha512 sha, byte[] hash); + + private static native int wc_RsaPublicEncrypt_fips(ByteBuffer in, + long inLen, ByteBuffer out, long outLen, Rsa key, Rng rng); + private static native int wc_RsaPublicEncrypt_fips(byte[] in, long inLen, + byte[] out, long outLen, Rsa key, Rng rng); + private static native int wc_RsaPrivateDecrypt_fips(ByteBuffer in, + long inLen, ByteBuffer out, long outLen, Rsa key); + private static native int wc_RsaPrivateDecrypt_fips(byte[] in, long inLen, + byte[] out, long outLen, Rsa key); + + private static native int wc_InitMd5(Md5 md5); + private static native int wc_Md5Update(Md5 md5, ByteBuffer data, long len); + private static native int wc_Md5Update(Md5 md5, byte[] data, long len); + private static native int wc_Md5Final(Md5 md5, ByteBuffer hash); + private static native int wc_Md5Final(Md5 md5, byte[] hash); + + private static native void wc_InitDhKey(Dh key); + private static native void wc_FreeDhKey(Dh key); + private static native int wc_DhGenerateKeyPair(Dh key, Rng rng, + ByteBuffer priv, long[] privSz, ByteBuffer pub, long[] pubSz); + private static native int wc_DhGenerateKeyPair(Dh key, Rng rng, + byte[] priv, long[] privSz, byte[] pub, long[] pubSz); + private static native int wc_DhAgree(Dh key, ByteBuffer agree, + long[] agreeSz, ByteBuffer priv, long privSz, ByteBuffer otherPub, + long pubSz); + private static native int wc_DhAgree(Dh key, byte[] agree, long[] agreeSz, + byte[] priv, long privSz, byte[] otherPub, long pubSz); + private static native int wc_DhKeyDecode(ByteBuffer input, long[] inOutIdx, + Dh key, long inSz); + private static native int wc_DhKeyDecode(byte[] input, long[] inOutIdx, + Dh key, long inSz); + private static native int wc_DhSetKey(Dh key, ByteBuffer p, long pSz, + ByteBuffer g, long gSz); + private static native int wc_DhSetKey(Dh key, byte[] p, long pSz, + byte[] g, long gSz); + private static native int wc_DhParamsLoad(ByteBuffer input, long inSz, + ByteBuffer p, long[] pInOutSz, ByteBuffer g, long[] gInOutSz); + private static native int wc_DhParamsLoad(byte[] input, long inSz, + byte[] p, long[] pInOutSz, byte[] g, long[] gInOutSz); + private static native int wc_ecc_init(Ecc key); + private static native void wc_ecc_free(Ecc key); + private static native int wc_ecc_make_key(Rng rng, int keysize, Ecc key); + private static native int wc_ecc_shared_secret(Ecc private_key, + Ecc public_key, ByteBuffer out, long[] outlen); + private static native int wc_ecc_shared_secret(Ecc private_key, + Ecc public_key, byte[] out, long[] outlen); + private static native int wc_ecc_import_x963(ByteBuffer in, long inLen, + Ecc key); + private static native int wc_ecc_import_x963(byte[] in, long inLen, + Ecc key); + private static native int wc_ecc_export_x963(Ecc key, ByteBuffer out, + long[] outLen); + private static native int wc_ecc_export_x963(Ecc key, byte[] out, + long[] outLen); + + /* -----------------------------------------------------------------------*/ + /* FIPS Approved Security Methods */ + /* -----------------------------------------------------------------------*/ + + /* wolfCrypt FIPS API - Symmetric encrypt/decrypt Service */ /* AES */ /** * Initializes Aes object for CBC mode with key and iv. * - * @param aes - * the Aes object. - * @param userKey - * the key to be set. - * @param keylen - * the key length. - * @param iv - * the initialization vector (optional). - * @param dir - * the direction (encryption|decryption). + * @param aes the Aes object. + * @param userKey the key to be set. + * @param keylen the key length. + * @param iv the initialization vector (optional). + * @param dir the direction (encryption|decryption). * * @return 0 on success, {@literal <} 0 on error. */ - public static native int AesSetKey_fips(Aes aes, ByteBuffer userKey, - long keylen, ByteBuffer iv, int dir); + public static int AesSetKey_fips(Aes aes, ByteBuffer userKey, long keylen, + ByteBuffer iv, int dir) { + + runAllCast_fips(); + + return wc_AesSetKey_fips(aes, userKey, keylen, iv, dir); + } /** * Initializes Aes object for CBC mode with key and iv. * - * @param aes - * the Aes object. - * @param userKey - * the key to be set. - * @param keylen - * the key length. - * @param iv - * the initialization vector (optional). - * @param dir - * the direction (encryption|decryption). + * @param aes the Aes object. + * @param userKey the key to be set. + * @param keylen the key length. + * @param iv the initialization vector (optional). + * @param dir the direction (encryption|decryption). * * @return 0 on success, {@literal <} 0 on error. */ - public static native int AesSetKey_fips(Aes aes, byte[] userKey, - long keylen, byte[] iv, int dir); + public static int AesSetKey_fips(Aes aes, byte[] userKey, long keylen, + byte[] iv, int dir) { + + runAllCast_fips(); + + return wc_AesSetKey_fips(aes, userKey, keylen, iv, dir); + } /** * Initializes Aes object with iv. * - * @param aes - * the Aes object. - * @param iv - * the initialization vector. + * @param aes the Aes object. + * @param iv the initialization vector. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int AesSetIV_fips(Aes aes, ByteBuffer iv); + public static int AesSetIV_fips(Aes aes, ByteBuffer iv) { + + runAllCast_fips(); + + return wc_AesSetIV_fips(aes, iv); + } /** * Initializes Aes object with iv. * - * @param aes - * the Aes object. - * @param iv - * the initialization vector. + * @param aes the Aes object. + * @param iv the initialization vector. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int AesSetIV_fips(Aes aes, byte[] iv); + public static int AesSetIV_fips(Aes aes, byte[] iv) { + + runAllCast_fips(); + + return wc_AesSetIV_fips(aes, iv); + } /** - * Performs Aes Cbc Encryption. + * Performs AES-CBC encryption. * - * @param aes - * the Aes object. - * @param out - * the output buffer. - * @param in - * the input buffer. - * @param sz - * the input length. + * @param aes the Aes object + * @param out the output buffer + * @param in the input buffer + * @param sz the input length * * @return 0 on success, {@literal <} 0 on error. */ - public static native int AesCbcEncrypt_fips(Aes aes, ByteBuffer out, - ByteBuffer in, long sz); + public static int AesCbcEncrypt_fips(Aes aes, ByteBuffer out, ByteBuffer in, + long sz) { + + runAllCast_fips(); + + return wc_AesCbcEncrypt_fips(aes, out, in, sz); + } /** - * Performs Aes Cbc Encryption. + * Performs AES-CBC encryption. * - * @param aes - * the Aes object. - * @param out - * the output buffer. - * @param in - * the input buffer. - * @param sz - * the input length. + * @param aes the Aes object + * @param out the output buffer + * @param in the input buffer + * @param sz the input length * * @return 0 on success, {@literal <} 0 on error. */ - public static native int AesCbcEncrypt_fips(Aes aes, byte[] out, byte[] in, - long sz); + public static int AesCbcEncrypt_fips(Aes aes, byte[] out, byte[] in, + long sz) { + + runAllCast_fips(); + + return wc_AesCbcEncrypt_fips(aes, out, in, sz); + } /** - * Performs Aes Cbc Decryption. + * Performs AES-CBC decryption. * - * @param aes - * the Aes object. - * @param out - * the output buffer. - * @param in - * the input buffer. - * @param sz - * the input length. + * @param aes the Aes object. + * @param out the output buffer. + * @param in the input buffer. + * @param sz the input length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int AesCbcDecrypt_fips(Aes aes, ByteBuffer out, - ByteBuffer in, long sz); + public static int AesCbcDecrypt_fips(Aes aes, ByteBuffer out, + ByteBuffer in, long sz) { + + runAllCast_fips(); + + return wc_AesCbcDecrypt_fips(aes, out, in, sz); + } /** - * Performs Aes Cbc Decryption. + * Performs AES-CBC decryption. * - * @param aes - * the Aes object. - * @param out - * the output buffer. - * @param in - * the input buffer. - * @param sz - * the input length. + * @param aes the Aes object. + * @param out the output buffer. + * @param in the input buffer. + * @param sz the input length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int AesCbcDecrypt_fips(Aes aes, byte[] out, byte[] in, - long sz); + public static int AesCbcDecrypt_fips(Aes aes, byte[] out, byte[] in, + long sz) { + + runAllCast_fips(); + + return wc_AesCbcDecrypt_fips(aes, out, in, sz); + } /** * Initializes Aes object for GCM mode with key. * - * @param aes - * the Aes object. - * @param userKey - * the key to be set. - * @param keylen - * the key length. + * @param aes the Aes object. + * @param userKey the key to be set. + * @param keylen the key length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int AesGcmSetKey_fips(Aes aes, ByteBuffer userKey, - long keylen); + public static int AesGcmSetKey_fips(Aes aes, ByteBuffer userKey, + long keylen) { + + runAllCast_fips(); + + return wc_AesGcmSetKey_fips(aes, userKey, keylen); + } /** * Initializes Aes object for GCM mode with key. * - * @param aes - * the Aes object. - * @param userKey - * the key to be set. - * @param keylen - * the key length. + * @param aes the Aes object. + * @param userKey the key to be set. + * @param keylen the key length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int AesGcmSetKey_fips(Aes aes, byte[] userKey, - long keylen); + public static int AesGcmSetKey_fips(Aes aes, byte[] userKey, long keylen) { + + runAllCast_fips(); + + return wc_AesGcmSetKey_fips(aes, userKey, keylen); + } /** * Initializes Aes object with external IV for AES-GCM. * - * @param aes - * the Aes object. - * @param iv - * the initialization vector. - * @param ivlen - * length of IV + * @param aes the Aes object. + * @param iv the initialization vector. + * @param ivlen length of IV * * @return 0 on success, {@literal <} 0 on error. */ - public static native int AesGcmSetExtIV_fips(Aes aes, ByteBuffer iv, - long ivlen); + public static int AesGcmSetExtIV_fips(Aes aes, ByteBuffer iv, long ivlen) { + + runAllCast_fips(); + + return wc_AesGcmSetExtIV_fips(aes, iv, ivlen); + } /** * Initializes Aes object with external IV for AES-GCM. * - * @param aes - * the Aes object. - * @param iv - * the initialization vector. - * @param ivlen - * length of IV - * - * @return 0 on success, {@literal <} 0 on error. - */ - public static native int AesGcmSetExtIV_fips(Aes aes, byte[] iv, - long ivlen); - - /** - * Performs aes GCM Encryption. - * - * @param aes - * the Aes object. - * @param out - * the output buffer. - * @param in - * the input buffer. - * @param sz - * the input length. - * @param iv - * the initialization vector buffer. - * @param ivSz - * the initialization vector length. - * @param authTag - * the authTag buffer. - * @param authTagSz - * the authTag length. - * @param authIn - * the authIn buffer. - * @param authInSz - * the authIn length. - * - * @return 0 on success, {@literal <} 0 on error. - */ - public static native int AesGcmEncrypt_fips(Aes aes, ByteBuffer out, - ByteBuffer in, long sz, ByteBuffer iv, long ivSz, - ByteBuffer authTag, long authTagSz, ByteBuffer authIn, - long authInSz); - - /** - * Performs aes GCM Encryption. - * - * @param aes - * the Aes object. - * @param out - * the output buffer. - * @param in - * the input buffer. - * @param sz - * the input length. - * @param iv - * the initialization vector buffer. - * @param ivSz - * the initialization vector length. - * @param authTag - * the authTag buffer. - * @param authTagSz - * the authTag length. - * @param authIn - * the authIn buffer. - * @param authInSz - * the authIn length. - * - * @return 0 on success, {@literal <} 0 on error. - */ - public static native int AesGcmEncrypt_fips(Aes aes, byte[] out, - byte[] in, long sz, byte[] iv, long ivSz, - byte[] authTag, long authTagSz, byte[] authIn, long authInSz); - - /** - * Performs aes GCM Decryption. - * - * @param aes - * the Aes object. - * @param out - * the output buffer. - * @param in - * the input buffer. - * @param sz - * the input length. - * @param iv - * the initialization vector buffer. - * @param ivSz - * the initialization vector length. - * @param authTag - * the authTag buffer. - * @param authTagSz - * the authTag length. - * @param authIn - * the authIn buffer. - * @param authInSz - * the authIn length. - * - * @return 0 on success, {@literal <} 0 on error. - */ - public static native int AesGcmDecrypt_fips(Aes aes, ByteBuffer out, - ByteBuffer in, long sz, ByteBuffer iv, long ivSz, - ByteBuffer authTag, long authTagSz, ByteBuffer authIn, long authInSz); - - /** - * Performs aes GCM Decryption. - * - * @param aes - * the Aes object. - * @param out - * the output buffer. - * @param in - * the input buffer. - * @param sz - * the input length. - * @param iv - * the initialization vector buffer. - * @param ivSz - * the initialization vector length. - * @param authTag - * the authTag buffer. - * @param authTagSz - * the authTag length. - * @param authIn - * the authIn buffer. - * @param authInSz - * the authIn length. - * - * @return 0 on success, {@literal <} 0 on error. - */ - public static native int AesGcmDecrypt_fips(Aes aes, byte[] out, - byte[] in, long sz, byte[] iv, long ivSz, - byte[] authTag, long authTagSz, byte[] authIn, long authInSz); + * @param aes the Aes object. + * @param iv the initialization vector. + * @param ivlen length of IV + * + * @return 0 on success, {@literal <} 0 on error. + */ + public static int AesGcmSetExtIV_fips(Aes aes, byte[] iv, long ivlen) { + + runAllCast_fips(); + + return wc_AesGcmSetExtIV_fips(aes, iv, ivlen); + } + + /** + * Performs AES-GCM encryption. + * + * @param aes the Aes object. + * @param out the output buffer. + * @param in the input buffer. + * @param sz the input length. + * @param iv the initialization vector buffer. + * @param ivSz the initialization vector length. + * @param authTag the authTag buffer. + * @param authTagSz the authTag length. + * @param authIn the authIn buffer. + * @param authInSz the authIn length. + * + * @return 0 on success, {@literal <} 0 on error. + */ + public static int AesGcmEncrypt_fips(Aes aes, ByteBuffer out, ByteBuffer in, + long sz, ByteBuffer iv, long ivSz, ByteBuffer authTag, long authTagSz, + ByteBuffer authIn, long authInSz) { + + runAllCast_fips(); + + return wc_AesGcmEncrypt_fips(aes, out, in, sz, iv, ivSz, authTag, + authTagSz, authIn, authInSz); + } + + /** + * Performs AES-GCM encryption. + * + * @param aes the Aes object. + * @param out the output buffer. + * @param in the input buffer. + * @param sz the input length. + * @param iv the initialization vector buffer. + * @param ivSz the initialization vector length. + * @param authTag the authTag buffer. + * @param authTagSz the authTag length. + * @param authIn the authIn buffer. + * @param authInSz the authIn length. + * + * @return 0 on success, {@literal <} 0 on error. + */ + public static int AesGcmEncrypt_fips(Aes aes, byte[] out, byte[] in, + long sz, byte[] iv, long ivSz, byte[] authTag, long authTagSz, + byte[] authIn, long authInSz) { + + runAllCast_fips(); + + return wc_AesGcmEncrypt_fips(aes, out, in, sz, iv, ivSz, authTag, + authTagSz, authIn, authInSz); + } + + /** + * Performs AES-GCM decryption. + * + * @param aes the Aes object. + * @param out the output buffer. + * @param in the input buffer. + * @param sz the input length. + * @param iv the initialization vector buffer. + * @param ivSz the initialization vector length. + * @param authTag the authTag buffer. + * @param authTagSz the authTag length. + * @param authIn the authIn buffer. + * @param authInSz the authIn length. + * + * @return 0 on success, {@literal <} 0 on error. + */ + public static int AesGcmDecrypt_fips(Aes aes, ByteBuffer out, ByteBuffer in, + long sz, ByteBuffer iv, long ivSz, ByteBuffer authTag, long authTagSz, + ByteBuffer authIn, long authInSz) { + + runAllCast_fips(); + + return wc_AesGcmDecrypt_fips(aes, out, in, sz, iv, ivSz, authTag, + authTagSz, authIn, authInSz); + } + + + /** + * Performs AES-GCM decryption. + * + * @param aes the Aes object. + * @param out the output buffer. + * @param in the input buffer. + * @param sz the input length. + * @param iv the initialization vector buffer. + * @param ivSz the initialization vector length. + * @param authTag the authTag buffer. + * @param authTagSz the authTag length. + * @param authIn the authIn buffer. + * @param authInSz the authIn length. + * + * @return 0 on success, {@literal <} 0 on error. + */ + public static int AesGcmDecrypt_fips(Aes aes, byte[] out, byte[] in, + long sz, byte[] iv, long ivSz, byte[] authTag, long authTagSz, + byte[] authIn, long authInSz) { + + runAllCast_fips(); + + return wc_AesGcmDecrypt_fips(aes, out, in, sz, iv, ivSz, authTag, + authTagSz, authIn, authInSz); + } /* DES3 */ /** * Initializes Des3 object for CBC mode with key and iv. * - * @param des - * the Des3 object. - * @param userKey - * the key to be set. - * @param iv - * the initialization vector (optional). - * @param dir - * the direction (encryption|decryption). + * @param des the Des3 object. + * @param userKey the key to be set. + * @param iv the initialization vector (optional). + * @param dir the direction (encryption|decryption). * * @return 0 on success, {@literal <} 0 on error. */ - public static native int Des3_SetKey_fips(Des3 des, ByteBuffer userKey, - ByteBuffer iv, int dir); + public static int Des3_SetKey_fips(Des3 des, ByteBuffer userKey, + ByteBuffer iv, int dir) { + + runAllCast_fips(); + + return wc_Des3_SetKey_fips(des, userKey, iv, dir); + } /** * Initializes Des3 object for CBC mode with key and iv. * - * @param des - * the Des3 object. - * @param userKey - * the key to be set. - * @param iv - * the initialization vector (optional). - * @param dir - * the direction (encryption|decryption). + * @param des the Des3 object. + * @param userKey the key to be set. + * @param iv the initialization vector (optional). + * @param dir the direction (encryption|decryption). * * @return 0 on success, {@literal <} 0 on error. */ - public static native int Des3_SetKey_fips(Des3 des, byte[] userKey, - byte[] iv, int dir); + public static int Des3_SetKey_fips(Des3 des, byte[] userKey, byte[] iv, + int dir) { + + runAllCast_fips(); + + return wc_Des3_SetKey_fips(des, userKey, iv, dir); + } /** * Initializes Des3 object with iv. * - * @param des - * the Des3 object. - * @param iv - * the initialization vector. + * @param des the Des3 object. + * @param iv the initialization vector. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int Des3_SetIV_fips(Des3 des, ByteBuffer iv); + public static int Des3_SetIV_fips(Des3 des, ByteBuffer iv) { + + runAllCast_fips(); + + return wc_Des3_SetIV_fips(des, iv); + } /** * Initializes Des3 object with iv. * - * @param des - * the Des3 object. - * @param iv - * the initialization vector. + * @param des the Des3 object. + * @param iv the initialization vector. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int Des3_SetIV_fips(Des3 des, byte[] iv); + public static int Des3_SetIV_fips(Des3 des, byte[] iv) { + + runAllCast_fips(); + + return wc_Des3_SetIV_fips(des, iv); + } /** - * Performs Des3 CBC Encryption. + * Performs 3DES-CBC encryption. * - * @param des - * the Des3 object. - * @param out - * the output buffer. - * @param in - * the input buffer. - * @param sz - * the input length. + * @param des the Des3 object. + * @param out the output buffer. + * @param in the input buffer. + * @param sz the input length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int Des3_CbcEncrypt_fips(Des3 des, ByteBuffer out, - ByteBuffer in, long sz); + public static int Des3_CbcEncrypt_fips(Des3 des, ByteBuffer out, + ByteBuffer in, long sz) { + + runAllCast_fips(); + + return wc_Des3_CbcEncrypt_fips(des, out, in, sz); + } /** - * Performs Des3 CBC Encryption. + * Performs 3DES-CBC encryption. * - * @param des - * the Des3 object. - * @param out - * the output buffer. - * @param in - * the input buffer. - * @param sz - * the input length. + * @param des the Des3 object. + * @param out the output buffer. + * @param in the input buffer. + * @param sz the input length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int Des3_CbcEncrypt_fips(Des3 des, byte[] out, - byte[] in, long sz); + public static int Des3_CbcEncrypt_fips(Des3 des, byte[] out, byte[] in, + long sz) { + + runAllCast_fips(); + + return wc_Des3_CbcEncrypt_fips(des, out, in, sz); + } /** - * Performs des3 CBC Decryption. + * Performs 3DES-CBC decryption. * - * @param des - * the Des3 object. - * @param out - * the output buffer. - * @param in - * the input buffer. - * @param sz - * the input length. + * @param des the Des3 object. + * @param out the output buffer. + * @param in the input buffer. + * @param sz the input length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int Des3_CbcDecrypt_fips(Des3 des, ByteBuffer out, - ByteBuffer in, long sz); + public static int Des3_CbcDecrypt_fips(Des3 des, ByteBuffer out, + ByteBuffer in, long sz) { + + runAllCast_fips(); + + return wc_Des3_CbcDecrypt_fips(des, out, in, sz); + } /** - * Performs des3 CBC Decryption. + * Performs 3DES-CBC decryption. * - * @param des - * the Des3 object. - * @param out - * the output buffer. - * @param in - * the input buffer. - * @param sz - * the input length. + * @param des the Des3 object. + * @param out the output buffer. + * @param in the input buffer. + * @param sz the input length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int Des3_CbcDecrypt_fips(Des3 des, byte[] out, - byte[] in, long sz); + public static int Des3_CbcDecrypt_fips(Des3 des, byte[] out, byte[] in, + long sz) { - /* - * wolfCrypt FIPS API - Keyed hash Service - */ + runAllCast_fips(); + + return wc_Des3_CbcDecrypt_fips(des, out, in, sz); + } + + /* wolfCrypt FIPS API - Keyed hash Service */ /* HMAC */ /** * Initializes Hmac object with type and key. * - * @param hmac - * the Hmac object. - * @param type - * the digest id. - * @param key - * the key buffer. - * @param keySz - * the key length. + * @param hmac the Hmac object. + * @param type the digest id. + * @param key the key buffer. + * @param keySz the key length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int HmacSetKey_fips(Hmac hmac, int type, - ByteBuffer key, long keySz); + public static int HmacSetKey_fips(Hmac hmac, int type, ByteBuffer key, + long keySz) { + + runAllCast_fips(); + + return wc_HmacSetKey_fips(hmac, type, key, keySz); + } /** * Initializes Hmac object with type and key. * - * @param hmac - * the Hmac object. - * @param type - * the digest id. - * @param key - * the key buffer. - * @param keySz - * the key length. + * @param hmac the Hmac object. + * @param type the digest id. + * @param key the key buffer. + * @param keySz the key length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int HmacSetKey_fips(Hmac hmac, int type, - byte[] key, long keySz); + public static int HmacSetKey_fips(Hmac hmac, int type, byte[] key, + long keySz) { + + runAllCast_fips(); + + return wc_HmacSetKey_fips(hmac, type, key, keySz); + } /** * Updates Hmac object with data. * - * @param hmac - * the Hmac object. - * @param data - * the input buffer. - * @param len - * the input length. + * @param hmac the Hmac object. + * @param data the input buffer. + * @param len the input length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int HmacUpdate_fips(Hmac hmac, ByteBuffer data, - long len); + public static int HmacUpdate_fips(Hmac hmac, ByteBuffer data, long len) { + + runAllCast_fips(); + + return wc_HmacUpdate_fips(hmac, data, len); + } /** * Updates Hmac object with data. * - * @param hmac - * the Hmac object. - * @param data - * the input buffer. - * @param len - * the input length. + * @param hmac the Hmac object. + * @param data the input buffer. + * @param len the input length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int HmacUpdate_fips(Hmac hmac, byte[] data, - long len); + public static int HmacUpdate_fips(Hmac hmac, byte[] data, long len) { + + runAllCast_fips(); + + return wc_HmacUpdate_fips(hmac, data, len); + } /** * Outputs Hmac digest to hash. * - * @param hmac - * the Hmac object. - * @param hash - * the output buffer. + * @param hmac the Hmac object. + * @param hash the output buffer. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int HmacFinal_fips(Hmac hmac, ByteBuffer hash); + public static int HmacFinal_fips(Hmac hmac, ByteBuffer hash) { + + runAllCast_fips(); + + return wc_HmacFinal_fips(hmac, hash); + } /** * Outputs Hmac digest to hash. * - * @param hmac - * the Hmac object. - * @param hash - * the output buffer. + * @param hmac the Hmac object. + * @param hash the output buffer. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int HmacFinal_fips(Hmac hmac, byte[] hash); + public static int HmacFinal_fips(Hmac hmac, byte[] hash) { - /* - * wolfCrypt FIPS API - Random number generation Service - */ + runAllCast_fips(); + + return wc_HmacFinal_fips(hmac, hash); + } + + /* wolfCrypt FIPS API - Random number generation Service */ /* RNG */ @@ -674,53 +949,64 @@ public static native int HmacUpdate_fips(Hmac hmac, byte[] data, * Initializes RNG object's resources and state. FreeRng_fips must be called * for resources deallocation. * - * @param rng - * the RNG object. + * @param rng the RNG object. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int InitRng_fips(Rng rng); + public static int InitRng_fips(Rng rng) { + + runAllCast_fips(); + + return wc_InitRng_fips(rng); + } /** * Releases RNG object's resources and zeros out state. * - * @param rng - * the RNG object. + * @param rng the RNG object. * * @return 0 on success, {@literal <} 0 on error. Also part of Zeroize * Service. */ - public static native int FreeRng_fips(Rng rng); + public static int FreeRng_fips(Rng rng) { + + runAllCast_fips(); + + return wc_FreeRng_fips(rng); + } /** * Outputs block of random data from RNG object. * - * @param rng - * the RNG object. - * @param buf - * the output buffer. - * @param bufSz - * the output length. + * @param rng the RNG object. + * @param buf the output buffer. + * @param bufSz the output length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int RNG_GenerateBlock_fips(Rng rng, ByteBuffer buf, - long bufSz); + public static int RNG_GenerateBlock_fips(Rng rng, ByteBuffer buf, + long bufSz) { + + runAllCast_fips(); + + return wc_RNG_GenerateBlock_fips(rng, buf, bufSz); + } /** * Outputs block of random data from RNG object. * - * @param rng - * the RNG object. - * @param buf - * the output buffer. - * @param bufSz - * the output length. + * @param rng the RNG object. + * @param buf the output buffer. + * @param bufSz the output length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int RNG_GenerateBlock_fips(Rng rng, byte[] buf, - long bufSz); + public static int RNG_GenerateBlock_fips(Rng rng, byte[] buf, long bufSz) { + + runAllCast_fips(); + + return wc_RNG_GenerateBlock_fips(rng, buf, bufSz); + } /** * When reseed is 0, tests the output of a temporary instance of an RNG @@ -731,26 +1017,25 @@ public static native int RNG_GenerateBlock_fips(Rng rng, byte[] buf, * bytes entropyBSz and then tests the RNG against the expected output of * size in bytes outputSz. * - * @param reseed - * the reseed flag. - * @param entropyA - * the entropyA buffer. - * @param entropyASz - * the entropyA length. - * @param entropyB - * the entropyB buffer. - * @param entropyBSz - * the entropyB length. - * @param output - * the output buffer. - * @param outputSz - * the output length. + * @param reseed the reseed flag. + * @param entropyA the entropyA buffer. + * @param entropyASz the entropyA length. + * @param entropyB the entropyB buffer. + * @param entropyBSz the entropyB length. + * @param output the output buffer. + * @param outputSz the output length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int RNG_HealthTest_fips(int reseed, - ByteBuffer entropyA, long entropyASz, ByteBuffer entropyB, - long entropyBSz, ByteBuffer output, long outputSz); + public static int RNG_HealthTest_fips(int reseed, ByteBuffer entropyA, + long entropyASz, ByteBuffer entropyB, long entropyBSz, + ByteBuffer output, long outputSz) { + + runAllCast_fips(); + + return wc_RNG_HealthTest_fips(reseed, entropyA, entropyASz, + entropyB, entropyBSz, output, outputSz); + } /** * When reseed is 0, tests the output of a temporary instance of an RNG @@ -761,26 +1046,25 @@ public static native int RNG_HealthTest_fips(int reseed, * bytes entropyBSz and then tests the RNG against the expected output of * size in bytes outputSz. * - * @param reseed - * the reseed flag. - * @param entropyA - * the entropyA buffer. - * @param entropyASz - * the entropyA length. - * @param entropyB - * the entropyB buffer. - * @param entropyBSz - * the entropyB length. - * @param output - * the output buffer. - * @param outputSz - * the output length. + * @param reseed the reseed flag. + * @param entropyA the entropyA buffer. + * @param entropyASz the entropyA length. + * @param entropyB the entropyB buffer. + * @param entropyBSz the entropyB length. + * @param output the output buffer. + * @param outputSz the output length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int RNG_HealthTest_fips(int reseed, - byte[] entropyA, long entropyASz, byte[] entropyB, - long entropyBSz, byte[] output, long outputSz); + public static int RNG_HealthTest_fips(int reseed, byte[] entropyA, + long entropyASz, byte[] entropyB, long entropyBSz, byte[] output, + long outputSz) { + + runAllCast_fips(); + + return wc_RNG_HealthTest_fips(reseed, entropyA, entropyASz, + entropyB, entropyBSz, output, outputSz); + } /* * wolfCrypt FIPS API - Digital signature and Key transport Services @@ -792,983 +1076,1048 @@ public static native int RNG_HealthTest_fips(int reseed, * Initializes Rsa object for use with optional heap hint p. FreeRsaKey_fips * must be called for resources deallocation. * - * @param key - * the Rsa object. - * @param heap - * the (optional) heap. + * @param key the Rsa object. + * @param heap the (optional) heap. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int InitRsaKey_fips(Rsa key, ByteBuffer heap); + public static int InitRsaKey_fips(Rsa key, ByteBuffer heap) { + + runAllCast_fips(); + + return wc_InitRsaKey_fips(key, heap); + } /** * Releases Rsa object's resources. * - * @param key - * the Rsa object. + * @param key the Rsa object. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int FreeRsaKey_fips(Rsa key); + public static int FreeRsaKey_fips(Rsa key) { + + runAllCast_fips(); + + return wc_FreeRsaKey_fips(key); + } /** - * Performs Rsa Signing Operation. + * Performs RSA sign operation. * - * @param in - * the input buffer. - * @param inLen - * the input length. - * @param out - * the output buffer. - * @param outLen - * the output length. - * @param key - * the Rsa object. - * @param rng - * the random source for padding. + * @param in the input buffer. + * @param inLen the input length. + * @param out the output buffer. + * @param outLen the output length. + * @param key the Rsa object. + * @param rng the random source for padding. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int RsaSSL_Sign_fips(ByteBuffer in, long inLen, - ByteBuffer out, long outLen, Rsa key, Rng rng); + public static int RsaSSL_Sign_fips(ByteBuffer in, long inLen, + ByteBuffer out, long outLen, Rsa key, Rng rng) { + + runAllCast_fips(); + + return wc_RsaSSL_Sign_fips(in, inLen, out, outLen, key, rng); + } /** - * Performs Rsa Signing Operation. + * Performs RSA sign operation. * - * @param in - * the input buffer. - * @param inLen - * the input length. - * @param out - * the output buffer. - * @param outLen - * the output length. - * @param key - * the Rsa object. - * @param rng - * the random source for padding. + * @param in the input buffer. + * @param inLen the input length. + * @param out the output buffer. + * @param outLen the output length. + * @param key the Rsa object. + * @param rng the random source for padding. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int RsaSSL_Sign_fips(byte[] in, long inLen, - byte[] out, long outLen, Rsa key, Rng rng); + public static int RsaSSL_Sign_fips(byte[] in, long inLen, byte[] out, + long outLen, Rsa key, Rng rng) { + + runAllCast_fips(); + + return wc_RsaSSL_Sign_fips(in, inLen, out, outLen, key, rng); + } /** - * Performs Rsa Signature Verification. + * Performs RSA signature verification. * - * @param in - * the input buffer. - * @param inLen - * the input length. - * @param out - * the output buffer. - * @param outLen - * the output length. - * @param key - * the Rsa object. + * @param in the input buffer. + * @param inLen the input length. + * @param out the output buffer. + * @param outLen the output length. + * @param key the Rsa object. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int RsaSSL_Verify_fips(ByteBuffer in, long inLen, - ByteBuffer out, long outLen, Rsa key); + public static int RsaSSL_Verify_fips(ByteBuffer in, long inLen, + ByteBuffer out, long outLen, Rsa key) { + + runAllCast_fips(); + + return wc_RsaSSL_Verify_fips(in, inLen, out, outLen, key); + } /** - * Performs Rsa Signature Verification. + * Performs RSA signature verification. * - * @param in - * the input buffer. - * @param inLen - * the input length. - * @param out - * the output buffer. - * @param outLen - * the output length. - * @param key - * the Rsa object. + * @param in the input buffer. + * @param inLen the input length. + * @param out the output buffer. + * @param outLen the output length. + * @param key the Rsa object. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int RsaSSL_Verify_fips(byte[] in, long inLen, - byte[] out, long outLen, Rsa key); + public static int RsaSSL_Verify_fips(byte[] in, long inLen, byte[] out, + long outLen, Rsa key) { + + runAllCast_fips(); + + return wc_RsaSSL_Verify_fips(in, inLen, out, outLen, key); + } /** - * Retrieves Rsa Output Size. + * Retrieves RSA output size. * - * @param key - * the Rsa object. + * @param key the Rsa object. * * @return key output size {@literal >} 0 on success, {@literal <} 0 on * error. */ - public static native int RsaEncryptSize_fips(Rsa key); + public static int RsaEncryptSize_fips(Rsa key) { + + runAllCast_fips(); + + return wc_RsaEncryptSize_fips(key); + } /** - * Decodes Rsa Private Key from buffer. + * Decodes RSA private key from buffer. * - * @param input - * the input buffer. - * @param inOutIdx - * the key's starting index in the input. - * @param key - * the Rsa object. - * @param inSz - * the input length. + * @param input the input buffer. + * @param inOutIdx the key's starting index in the input. + * @param key the Rsa object. + * @param inSz the input length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int RsaPrivateKeyDecode_fips(ByteBuffer input, - long[] inOutIdx, Rsa key, long inSz); + public static int RsaPrivateKeyDecode_fips(ByteBuffer input, + long[] inOutIdx, Rsa key, long inSz) { + + runAllCast_fips(); + + return wc_RsaPrivateKeyDecode_fips(input, inOutIdx, key, inSz); + } /** - * Decodes Rsa Private Key from buffer. + * Decodes RSA private key from buffer. * - * @param input - * the input buffer. - * @param inOutIdx - * the key's starting index in the input. - * @param key - * the Rsa object. - * @param inSz - * the input length. + * @param input the input buffer. + * @param inOutIdx the key's starting index in the input. + * @param key the Rsa object. + * @param inSz the input length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int RsaPrivateKeyDecode_fips(byte[] input, - long[] inOutIdx, Rsa key, long inSz); + public static int RsaPrivateKeyDecode_fips(byte[] input, long[] inOutIdx, + Rsa key, long inSz) { + + runAllCast_fips(); + + return wc_RsaPrivateKeyDecode_fips(input, inOutIdx, key, inSz); + } /** - * Decodes Rsa Public Key from buffer. + * Decodes RSA public key from buffer. * - * @param input - * the input buffer. - * @param inOutIdx - * the key's starting index in the input. - * @param key - * the Rsa object. - * @param inSz - * the input length. + * @param input the input buffer. + * @param inOutIdx the key's starting index in the input. + * @param key the Rsa object. + * @param inSz the input length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int RsaPublicKeyDecode_fips(ByteBuffer input, - long[] inOutIdx, Rsa key, long inSz); + public static int RsaPublicKeyDecode_fips(ByteBuffer input, long[] inOutIdx, + Rsa key, long inSz) { + + runAllCast_fips(); + + return wc_RsaPublicKeyDecode_fips(input, inOutIdx, key, inSz); + } /** - * Decodes Rsa Public Key from buffer. + * Decodes RSA public key from buffer. * - * @param input - * the input buffer. - * @param inOutIdx - * the key's starting index in the input. - * @param key - * the Rsa object. - * @param inSz - * the input length. + * @param input the input buffer. + * @param inOutIdx the key's starting index in the input. + * @param key the Rsa object. + * @param inSz the input length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int RsaPublicKeyDecode_fips(byte[] input, - long[] inOutIdx, Rsa key, long inSz); + public static int RsaPublicKeyDecode_fips(byte[] input, long[] inOutIdx, + Rsa key, long inSz) { - /* - * wolfCrypt FIPS API - Message digest Service - */ + runAllCast_fips(); + + return wc_RsaPublicKeyDecode_fips(input, inOutIdx, key, inSz); + } + + /* wolfCrypt FIPS API - Message digest Service */ /* SHA */ /** * Initializes Sha object for use. * - * @param sha - * the Sha object. + * @param sha the Sha object. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int InitSha_fips(Sha sha); + public static int InitSha_fips(Sha sha) { + + runAllCast_fips(); + + return wc_InitSha_fips(sha); + } /** * Updates Sha object with data. * - * @param sha - * the Sha object. - * @param data - * the input buffer. - * @param len - * the input length. + * @param sha the Sha object. + * @param data the input buffer. + * @param len the input length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int ShaUpdate_fips(Sha sha, ByteBuffer data, long len); + public static int ShaUpdate_fips(Sha sha, ByteBuffer data, long len) { + + runAllCast_fips(); + + return wc_ShaUpdate_fips(sha, data, len); + } /** * Updates Sha object with data. * - * @param sha - * the Sha object. - * @param data - * the input buffer. - * @param len - * the input length. + * @param sha the Sha object. + * @param data the input buffer. + * @param len the input length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int ShaUpdate_fips(Sha sha, byte[] data, long len); + public static int ShaUpdate_fips(Sha sha, byte[] data, long len) { + + runAllCast_fips(); + + return wc_ShaUpdate_fips(sha, data, len); + } /** * Outputs Sha digest to hash. * - * @param sha - * the Sha object. - * @param hash - * the output buffer. + * @param sha the Sha object. + * @param hash the output buffer. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int ShaFinal_fips(Sha sha, ByteBuffer hash); + public static int ShaFinal_fips(Sha sha, ByteBuffer hash) { + + runAllCast_fips(); + + return wc_ShaFinal_fips(sha, hash); + } /** * Outputs Sha digest to hash. * - * @param sha - * the Sha object. - * @param hash - * the output buffer. + * @param sha the Sha object. + * @param hash the output buffer. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int ShaFinal_fips(Sha sha, byte[] hash); + public static int ShaFinal_fips(Sha sha, byte[] hash) { + + runAllCast_fips(); + + return wc_ShaFinal_fips(sha, hash); + } /* SHA256 */ /** * Initializes Sha256 object for use. * - * @param sha - * the Sha256 object. + * @param sha the Sha256 object. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int InitSha256_fips(Sha256 sha); + public static int InitSha256_fips(Sha256 sha) { + + runAllCast_fips(); + + return wc_InitSha256_fips(sha); + } /** * Updates Sha256 object with data. * - * @param sha - * the Sha256 object. - * @param data - * the input buffer. - * @param len - * the input length. + * @param sha the Sha256 object. + * @param data the input buffer. + * @param len the input length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int Sha256Update_fips(Sha256 sha, ByteBuffer data, - long len); + public static int Sha256Update_fips(Sha256 sha, ByteBuffer data, + long len) { + + runAllCast_fips(); + + return wc_Sha256Update_fips(sha, data, len); + } /** * Updates Sha256 object with data. * - * @param sha - * the Sha256 object. - * @param data - * the input buffer. - * @param len - * the input length. + * @param sha the Sha256 object. + * @param data the input buffer. + * @param len the input length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int Sha256Update_fips(Sha256 sha, byte[] data, - long len); + public static int Sha256Update_fips(Sha256 sha, byte[] data, long len) { + + runAllCast_fips(); + + return wc_Sha256Update_fips(sha, data, len); + } /** * Outputs Sha256 digest to hash. * - * @param sha - * the Sha256 object. - * @param hash - * the output buffer. + * @param sha the Sha256 object. + * @param hash the output buffer. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int Sha256Final_fips(Sha256 sha, ByteBuffer hash); + public static int Sha256Final_fips(Sha256 sha, ByteBuffer hash) { + + runAllCast_fips(); + + return wc_Sha256Final_fips(sha, hash); + } /** * Outputs Sha256 digest to hash. * - * @param sha - * the Sha256 object. - * @param hash - * the output buffer. + * @param sha the Sha256 object. + * @param hash the output buffer. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int Sha256Final_fips(Sha256 sha, byte[] hash); + public static int Sha256Final_fips(Sha256 sha, byte[] hash) { + + runAllCast_fips(); + + return wc_Sha256Final_fips(sha, hash); + } /* SHA384 */ /** * Initializes Sha384 object for use. * - * @param sha - * the Sha384 object. + * @param sha the Sha384 object. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int InitSha384_fips(Sha384 sha); + public static int InitSha384_fips(Sha384 sha) { + + runAllCast_fips(); + + return wc_InitSha384_fips(sha); + } /** * Updates Sha384 object with data. * - * @param sha - * the Sha384 object. - * @param data - * the input buffer. - * @param len - * the input length. + * @param sha the Sha384 object. + * @param data the input buffer. + * @param len the input length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int Sha384Update_fips(Sha384 sha, ByteBuffer data, - long len); + public static int Sha384Update_fips(Sha384 sha, ByteBuffer data, + long len) { + + runAllCast_fips(); + + return wc_Sha384Update_fips(sha, data, len); + } /** * Updates Sha384 object with data. * - * @param sha - * the Sha384 object. - * @param data - * the input buffer. - * @param len - * the input length. + * @param sha the Sha384 object. + * @param data the input buffer. + * @param len the input length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int Sha384Update_fips(Sha384 sha, byte[] data, - long len); + public static int Sha384Update_fips(Sha384 sha, byte[] data, long len) { + + runAllCast_fips(); + + return wc_Sha384Update_fips(sha, data, len); + } /** * Outputs Sha384 digest to hash. * - * @param sha - * the Sha384 object. - * @param hash - * the output buffer. + * @param sha the Sha384 object. + * @param hash the output buffer. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int Sha384Final_fips(Sha384 sha, ByteBuffer hash); + public static int Sha384Final_fips(Sha384 sha, ByteBuffer hash) { + + runAllCast_fips(); + + return wc_Sha384Final_fips(sha, hash); + } /** * Outputs Sha384 digest to hash. * - * @param sha - * the Sha384 object. - * @param hash - * the output buffer. + * @param sha the Sha384 object. + * @param hash the output buffer. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int Sha384Final_fips(Sha384 sha, byte[] hash); + public static int Sha384Final_fips(Sha384 sha, byte[] hash) { + + runAllCast_fips(); + + return wc_Sha384Final_fips(sha, hash); + } /* SHA512 */ /** * Initializes Sha512 object for use. * - * @param sha - * the Sha512 object. + * @param sha the Sha512 object. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int InitSha512_fips(Sha512 sha); + public static int InitSha512_fips(Sha512 sha) { + + runAllCast_fips(); + + return wc_InitSha512_fips(sha); + } /** * Updates Sha512 object with data. * - * @param sha - * the Sha512 object. - * @param data - * the input buffer. - * @param len - * the input length. + * @param sha the Sha512 object. + * @param data the input buffer. + * @param len the input length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int Sha512Update_fips(Sha512 sha, ByteBuffer data, - long len); + public static int Sha512Update_fips(Sha512 sha, ByteBuffer data, + long len) { + + runAllCast_fips(); + + return wc_Sha512Update_fips(sha, data, len); + } /** * Updates Sha512 object with data. * - * @param sha - * the Sha512 object. - * @param data - * the input buffer. - * @param len - * the input length. + * @param sha the Sha512 object. + * @param data the input buffer. + * @param len the input length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int Sha512Update_fips(Sha512 sha, byte[] data, - long len); + public static int Sha512Update_fips(Sha512 sha, byte[] data, long len) { + + runAllCast_fips(); + + return wc_Sha512Update_fips(sha, data, len); + } /** * Outputs Sha512 digest to hash. * - * @param sha - * the Sha512 object. - * @param hash - * the output buffer. + * @param sha the Sha512 object. + * @param hash the output buffer. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int Sha512Final_fips(Sha512 sha, ByteBuffer hash); + public static int Sha512Final_fips(Sha512 sha, ByteBuffer hash) { + + runAllCast_fips(); + + return wc_Sha512Final_fips(sha, hash); + } /** * Outputs Sha512 digest to hash. * - * @param sha - * the Sha512 object. - * @param hash - * the output buffer. + * @param sha the Sha512 object. + * @param hash the output buffer. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int Sha512Final_fips(Sha512 sha, byte[] hash); - - /* - * wolfCrypt FIPS API - Show status Service - */ + public static int Sha512Final_fips(Sha512 sha, byte[] hash) { - /** - * Returns the current status of the wolfCrypt FIPS module. - * @return A return code of 0 means the module is in a state without - * errors. Any other return code is the specific error state of - * the module. - */ - public static native int wolfCrypt_GetStatus_fips(); + runAllCast_fips(); - /** - * Sets the fips module status. Only available if HAVE_FORCE_FIPS_FAILURE is - * defined on the native library. - * - * @param status - * the new status. - * @return 0 on success, {@literal <} 0 on error. - */ - public static native int wolfCrypt_SetStatus_fips(int status); + return wc_Sha512Final_fips(sha, hash); + } - /* - * ### FIPS Allowed Security Methods ####################################### - */ + /* -----------------------------------------------------------------------*/ + /* FIPS Allowed Security Methods */ + /* -----------------------------------------------------------------------*/ - /* - * wolfCrypt FIPS API - Key transport Service - */ + /* wolfCrypt FIPS API - Key Transport Service */ /** - * Performs Rsa Public Encryption. + * Performs RSA public encryption. * - * @param in - * the input buffer. - * @param inLen - * the input length. - * @param out - * the output buffer. - * @param outLen - * the output length. - * @param key - * the Rsa object. - * @param rng - * the random source for padding. + * @param in the input buffer. + * @param inLen the input length. + * @param out the output buffer. + * @param outLen the output length. + * @param key the Rsa object. + * @param rng the random source for padding. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int RsaPublicEncrypt_fips(ByteBuffer in, long inLen, - ByteBuffer out, long outLen, Rsa key, Rng rng); + public static int RsaPublicEncrypt_fips(ByteBuffer in, long inLen, + ByteBuffer out, long outLen, Rsa key, Rng rng) { + + runAllCast_fips(); + + return wc_RsaPublicEncrypt_fips(in, inLen, out, outLen, key, rng); + } /** - * Performs Rsa Public Encryption. + * Performs RSA public encryption. * - * @param in - * the input buffer. - * @param inLen - * the input length. - * @param out - * the output buffer. - * @param outLen - * the output length. - * @param key - * the Rsa object. - * @param rng - * the random source for padding. + * @param in the input buffer. + * @param inLen the input length. + * @param out the output buffer. + * @param outLen the output length. + * @param key the Rsa object. + * @param rng the random source for padding. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int RsaPublicEncrypt_fips(byte[] in, long inLen, - byte[] out, long outLen, Rsa key, Rng rng); + public static int RsaPublicEncrypt_fips(byte[] in, long inLen, byte[] out, + long outLen, Rsa key, Rng rng) { + + runAllCast_fips(); + + return wc_RsaPublicEncrypt_fips(in, inLen, out, outLen, key, rng); + } /** - * Performs Rsa Private Decryption. + * Performs RSA private decryption. * - * @param in - * the input buffer. - * @param inLen - * the input length. - * @param out - * the output buffer. - * @param outLen - * the output length. - * @param key - * the Rsa object. + * @param in the input buffer. + * @param inLen the input length. + * @param out the output buffer. + * @param outLen the output length. + * @param key the Rsa object. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int RsaPrivateDecrypt_fips(ByteBuffer in, long inLen, - ByteBuffer out, long outLen, Rsa key); + public static int RsaPrivateDecrypt_fips(ByteBuffer in, long inLen, + ByteBuffer out, long outLen, Rsa key) { + + runAllCast_fips(); + + return wc_RsaPrivateDecrypt_fips(in, inLen, out, outLen, key); + } /** - * Performs Rsa Private Decryption. + * Performs RSA private decryption. * - * @param in - * the input buffer. - * @param inLen - * the input length. - * @param out - * the output buffer. - * @param outLen - * the output length. - * @param key - * the Rsa object. + * @param in the input buffer. + * @param inLen the input length. + * @param out the output buffer. + * @param outLen the output length. + * @param key the Rsa object. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int RsaPrivateDecrypt_fips(byte[] in, long inLen, - byte[] out, long outLen, Rsa key); + public static int RsaPrivateDecrypt_fips(byte[] in, long inLen, byte[] out, + long outLen, Rsa key) { - /* - * wolfCrypt FIPS API - Message digest MD5 Service - */ + runAllCast_fips(); + + return wc_RsaPrivateDecrypt_fips(in, inLen, out, outLen, key); + } + + /* wolfCrypt FIPS API - Message digest MD5 Service */ /** * Initializes Md5 object for use. * - * @param md5 - * the Md5 object. + * @param md5 the Md5 object. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int InitMd5(Md5 md5); + public static int InitMd5(Md5 md5) { + + runAllCast_fips(); + + return wc_InitMd5(md5); + } /** * Updates Md5 object with data. * - * @param md5 - * the Md5 object. - * @param data - * the input buffer. - * @param len - * the input length. + * @param md5 the Md5 object. + * @param data the input buffer. + * @param len the input length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int Md5Update(Md5 md5, ByteBuffer data, long len); + public static int Md5Update(Md5 md5, ByteBuffer data, long len) { + + runAllCast_fips(); + + return wc_Md5Update(md5, data, len); + } /** * Updates Md5 object with data. * - * @param md5 - * the Md5 object. - * @param data - * the input buffer. - * @param len - * the input length. + * @param md5 the Md5 object. + * @param data the input buffer. + * @param len the input length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int Md5Update(Md5 md5, byte[] data, long len); + public static int Md5Update(Md5 md5, byte[] data, long len) { + + runAllCast_fips(); + + return wc_Md5Update(md5, data, len); + } /** * Outputs Md5 digest to hash. * - * @param md5 - * the Md5 object. - * @param hash - * the output buffer. + * @param md5 the Md5 object. + * @param hash the output buffer. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int Md5Final(Md5 md5, ByteBuffer hash); + public static int Md5Final(Md5 md5, ByteBuffer hash) { + + runAllCast_fips(); + + return wc_Md5Final(md5, hash); + } /** * Outputs Md5 digest to hash. * - * @param md5 - * the Md5 object. - * @param hash - * the output buffer. + * @param md5 the Md5 object. + * @param hash the output buffer. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int Md5Final(Md5 md5, byte[] hash); + public static int Md5Final(Md5 md5, byte[] hash) { - /* - * wolfCrypt FIPS API - Key agreement Service - */ + runAllCast_fips(); + + return wc_Md5Final(md5, hash); + } + + /* wolfCrypt FIPS API - Key Agreement Service */ /** * Initializes Dh object for use. FreeDhKey must be called for resources * deallocation. * - * @param key - * the Dh object. + * @param key the Dh object. */ - public static native void InitDhKey(Dh key); + public static void InitDhKey(Dh key) { + + runAllCast_fips(); + + wc_InitDhKey(key); + } /** * Releases Dh object's resources. * - * @param key - * the Dh object. + * @param key the Dh object. */ - public static native void FreeDhKey(Dh key); + public static void FreeDhKey(Dh key) { + + runAllCast_fips(); + + wc_FreeDhKey(key); + } /** * Generates the public part pub of size pubSz, private part priv of size * privSz using rng for Dh key. * - * @param key - * the Dh object. - * @param rng - * the random source. - * @param priv - * the private part buffer. - * @param privSz - * the private part length. - * @param pub - * the public part buffer. - * @param pubSz - * the the public part length. + * @param key the Dh object. + * @param rng the random source. + * @param priv the private part buffer. + * @param privSz the private part length. + * @param pub the public part buffer. + * @param pubSz the the public part length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int DhGenerateKeyPair(Dh key, Rng rng, - ByteBuffer priv, long[] privSz, ByteBuffer pub, long[] pubSz); + public static int DhGenerateKeyPair(Dh key, Rng rng, ByteBuffer priv, + long[] privSz, ByteBuffer pub, long[] pubSz) { + + runAllCast_fips(); + + return wc_DhGenerateKeyPair(key, rng, priv, privSz, pub, pubSz); + } /** * Generates the public part pub of size pubSz, private part priv of size * privSz using rng for Dh key. * - * @param key - * the Dh object. - * @param rng - * the random source. - * @param priv - * the private part buffer. - * @param privSz - * the private part length. - * @param pub - * the public part buffer. - * @param pubSz - * the the public part length. + * @param key the Dh object. + * @param rng the random source. + * @param priv the private part buffer. + * @param privSz the private part length. + * @param pub the public part buffer. + * @param pubSz the the public part length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int DhGenerateKeyPair(Dh key, Rng rng, - byte[] priv, long[] privSz, byte[] pub, long[] pubSz); + public static int DhGenerateKeyPair(Dh key, Rng rng, byte[] priv, + long[] privSz, byte[] pub, long[] pubSz) { + + runAllCast_fips(); + + return wc_DhGenerateKeyPair(key, rng, priv, privSz, pub, pubSz); + } /** * Creates the agreement agree of size agreeSz using Dh key private priv of * size privSz and peer's public key otherPub of size pubSz. * - * @param key - * the Dh object. - * @param agree - * the agree buffer. - * @param agreeSz - * the agree length. - * @param priv - * the private part buffer. - * @param privSz - * the private part length. - * @param otherPub - * the peer's public part buffer. - * @param pubSz - * the the public part length. + * @param key the Dh object. + * @param agree the agree buffer. + * @param agreeSz the agree length. + * @param priv the private part buffer. + * @param privSz the private part length. + * @param otherPub the peer's public part buffer. + * @param pubSz the the public part length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int DhAgree(Dh key, ByteBuffer agree, long[] agreeSz, - ByteBuffer priv, long privSz, ByteBuffer otherPub, long pubSz); + public static int DhAgree(Dh key, ByteBuffer agree, long[] agreeSz, + ByteBuffer priv, long privSz, ByteBuffer otherPub, long pubSz) { + + runAllCast_fips(); + + return wc_DhAgree(key, agree, agreeSz, priv, privSz, otherPub, pubSz); + } /** * Creates the agreement agree of size agreeSz using Dh key private priv of * size privSz and peer's public key otherPub of size pubSz. * - * @param key - * the Dh object. - * @param agree - * the agree buffer. - * @param agreeSz - * the agree length. - * @param priv - * the private part buffer. - * @param privSz - * the private part length. - * @param otherPub - * the peer's public part buffer. - * @param pubSz - * the the public part length. + * @param key the Dh object. + * @param agree the agree buffer. + * @param agreeSz the agree length. + * @param priv the private part buffer. + * @param privSz the private part length. + * @param otherPub the peer's public part buffer. + * @param pubSz the the public part length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int DhAgree(Dh key, byte[] agree, long[] agreeSz, - byte[] priv, long privSz, byte[] otherPub, long pubSz); + public static int DhAgree(Dh key, byte[] agree, long[] agreeSz, byte[] priv, + long privSz, byte[] otherPub, long pubSz) { + + runAllCast_fips(); + + return wc_DhAgree(key, agree, agreeSz, priv, privSz, otherPub, pubSz); + } /** * Decodes the DER group parameters from buffer input starting at index * inOutIdx of size inSz into Dh key. * - * @param input - * the parameters buffer. - * @param inOutIdx - * the parameters' starting index. - * @param key - * the Dh object. - * @param inSz - * the parameters buffer length. (not from inOutIdx) + * @param input the parameters buffer. + * @param inOutIdx the parameters' starting index. + * @param key the Dh object. + * @param inSz the parameters buffer length. (not from inOutIdx) * * @return 0 on success, {@literal <} 0 on error. */ - public static native int DhKeyDecode(ByteBuffer input, long[] inOutIdx, - Dh key, long inSz); + public static int DhKeyDecode(ByteBuffer input, long[] inOutIdx, Dh key, + long inSz) { + + runAllCast_fips(); + + return wc_DhKeyDecode(input, inOutIdx, key, inSz); + } /** * Decodes the DER group parameters from buffer input starting at index * inOutIdx of size inSz into Dh key. * - * @param input - * the parameters buffer. - * @param inOutIdx - * the parameters' starting index. - * @param key - * the Dh object. - * @param inSz - * the parameters buffer length. (not from inOutIdx) + * @param input the parameters buffer. + * @param inOutIdx the parameters' starting index. + * @param key the Dh object. + * @param inSz the parameters buffer length. (not from inOutIdx) * * @return 0 on success, {@literal <} 0 on error. */ - public static native int DhKeyDecode(byte[] input, long[] inOutIdx, - Dh key, long inSz); + public static int DhKeyDecode(byte[] input, long[] inOutIdx, Dh key, + long inSz) { + + runAllCast_fips(); + + return wc_DhKeyDecode(input, inOutIdx, key, inSz); + } /** * Sets the group parameters for the Dh key from the unsigned binary inputs * p of size pSz and g of size gSz. * - * @param key - * the Dh object. - * @param p - * the prime buffer. - * @param pSz - * the prime length. - * @param g - * the primitive root molulo p buffer. - * @param gSz - * the primitive root modulo p length. + * @param key the Dh object. + * @param p the prime buffer. + * @param pSz the prime length. + * @param g the primitive root molulo p buffer. + * @param gSz the primitive root modulo p length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int DhSetKey(Dh key, ByteBuffer p, long pSz, - ByteBuffer g, long gSz); + public static int DhSetKey(Dh key, ByteBuffer p, long pSz, ByteBuffer g, + long gSz) { + + runAllCast_fips(); + + return wc_DhSetKey(key, p, pSz, g, gSz); + } /** * Sets the group parameters for the Dh key from the unsigned binary inputs * p of size pSz and g of size gSz. * - * @param key - * the Dh object. - * @param p - * the prime buffer. - * @param pSz - * the prime length. - * @param g - * the primitive root molulo p buffer. - * @param gSz - * the primitive root modulo p length. + * @param key the Dh object. + * @param p the prime buffer. + * @param pSz the prime length. + * @param g the primitive root molulo p buffer. + * @param gSz the primitive root modulo p length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int DhSetKey(Dh key, byte[] p, long pSz, - byte[] g, long gSz); + public static int DhSetKey(Dh key, byte[] p, long pSz, byte[] g, long gSz) { + + runAllCast_fips(); + + return wc_DhSetKey(key, p, pSz, g, gSz); + } /** - * Loads the Dh group parameters. + * Loads the DH group parameters. * - * @param input - * the parameters buffer. - * @param inSz - * the parameters size. - * @param p - * the prime buffer. - * @param pInOutSz - * the prime length. - * @param g - * the primitive root molulo p buffer. - * @param gInOutSz - * the primitive root modulo p length. + * @param input the parameters buffer. + * @param inSz the parameters size. + * @param p the prime buffer. + * @param pInOutSz the prime length. + * @param g the primitive root molulo p buffer. + * @param gInOutSz the primitive root modulo p length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int DhParamsLoad(ByteBuffer input, long inSz, - ByteBuffer p, long[] pInOutSz, ByteBuffer g, long[] gInOutSz); + public static int DhParamsLoad(ByteBuffer input, long inSz, + ByteBuffer p, long[] pInOutSz, ByteBuffer g, long[] gInOutSz) { + + runAllCast_fips(); + + return wc_DhParamsLoad(input, inSz, p, pInOutSz, g, gInOutSz); + } /** - * Loads the Dh group parameters. + * Loads the DH group parameters. * - * @param input - * the parameters buffer. - * @param inSz - * the parameters size. - * @param p - * the prime buffer. - * @param pInOutSz - * the prime length. - * @param g - * the primitive root molulo p buffer. - * @param gInOutSz - * the primitive root modulo p length. + * @param input the parameters buffer. + * @param inSz the parameters size. + * @param p the prime buffer. + * @param pInOutSz the prime length. + * @param g the primitive root molulo p buffer. + * @param gInOutSz the primitive root modulo p length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int DhParamsLoad(byte[] input, long inSz, - byte[] p, long[] pInOutSz, byte[] g, long[] gInOutSz); + public static int DhParamsLoad(byte[] input, long inSz, byte[] p, + long[] pInOutSz, byte[] g, long[] gInOutSz) { + + runAllCast_fips(); + + return wc_DhParamsLoad(input, inSz, p, pInOutSz, g, gInOutSz); + } /** * Initializes Ecc object for use. ecc_free must be called for resources * deallocation. * - * @param key - * the Ecc object. + * @param key the Ecc object. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int ecc_init(Ecc key); + public static int ecc_init(Ecc key) { + + runAllCast_fips(); + + return wc_ecc_init(key); + } /** * Releases Ecc object's resources. * - * @param key - * the Ecc object. + * @param key the Ecc object. */ - public static native void ecc_free(Ecc key); + public static void ecc_free(Ecc key) { + + runAllCast_fips(); + + wc_ecc_free(key); + } /** - * Generates a new ecc key of size keysize using rng. + * Generates a new ECC key of size keysize using rng. * - * @param rng - * the random source. - * @param keysize - * the key length. - * @param key - * the Ecc object. + * @param rng the random source. + * @param keysize the key length. + * @param key the Ecc object. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int ecc_make_key(Rng rng, int keysize, Ecc key); + public static int ecc_make_key(Rng rng, int keysize, Ecc key) { + + runAllCast_fips(); + + return wc_ecc_make_key(rng, keysize, key); + } /** * Creates the shared secret out of size outlen using ecc private_key and * the peer's ecc public_key. * - * @param private_key - * the Ecc object for the private key. - * @param public_key - * the Ecc object for the peer's public key. - * @param out - * the output buffer. - * @param outlen - * the output length. + * @param private_key the Ecc object for the private key. + * @param public_key the Ecc object for the peer's public key. + * @param out the output buffer. + * @param outlen the output length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int ecc_shared_secret(Ecc private_key, Ecc public_key, - ByteBuffer out, long[] outlen); + public static int ecc_shared_secret(Ecc private_key, Ecc public_key, + ByteBuffer out, long[] outlen) { + + runAllCast_fips(); + + return wc_ecc_shared_secret(private_key, public_key, out, outlen); + } /** * Creates the shared secret out of size outlen using ecc private_key and * the peer's ecc public_key. * - * @param private_key - * the Ecc object for the private key. - * @param public_key - * the Ecc object for the peer's public key. - * @param out - * the output buffer. - * @param outlen - * the output length. + * @param private_key the Ecc object for the private key. + * @param public_key the Ecc object for the peer's public key. + * @param out the output buffer. + * @param outlen the output length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int ecc_shared_secret(Ecc private_key, Ecc public_key, - byte[] out, long[] outlen); + public static int ecc_shared_secret(Ecc private_key, Ecc public_key, + byte[] out, long[] outlen) { + + runAllCast_fips(); + + return wc_ecc_shared_secret(private_key, public_key, out, outlen); + } /** * Imports the public ecc key from in of length inLen in x963 format. * - * @param in - * the input buffer. - * @param inLen - * the input length. - * @param key - * the Ecc object. + * @param in the input buffer. + * @param inLen the input length. + * @param key the Ecc object. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int ecc_import_x963(ByteBuffer in, long inLen, - Ecc key); + public static int ecc_import_x963(ByteBuffer in, long inLen, Ecc key) { + + runAllCast_fips(); + + return wc_ecc_import_x963(in, inLen, key); + } /** * Imports the public ecc key from in of length inLen in x963 format. * - * @param in - * the input buffer. - * @param inLen - * the input length. - * @param key - * the Ecc object. + * @param in the input buffer. + * @param inLen the input length. + * @param key the Ecc object. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int ecc_import_x963(byte[] in, long inLen, - Ecc key); + public static int ecc_import_x963(byte[] in, long inLen, Ecc key) { + + runAllCast_fips(); + + return wc_ecc_import_x963(in, inLen, key); + } /** * Exports the public ecc key into out of length outLen in x963 format. * - * @param key - * the Ecc object. - * @param out - * the output buffer. - * @param outLen - * the output length. + * @param key the Ecc object. + * @param out the output buffer. + * @param outLen the output length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int ecc_export_x963(Ecc key, ByteBuffer out, - long[] outLen); + public static int ecc_export_x963(Ecc key, ByteBuffer out, long[] outLen) { + + runAllCast_fips(); + + return wc_ecc_export_x963(key, out, outLen); + } /** * Exports the public ecc key into out of length outLen in x963 format. * - * @param key - * the Ecc object. - * @param out - * the output buffer. - * @param outLen - * the output length. + * @param key the Ecc object. + * @param out the output buffer. + * @param outLen the output length. * * @return 0 on success, {@literal <} 0 on error. */ - public static native int ecc_export_x963(Ecc key, byte[] out, - long[] outLen); + public static int ecc_export_x963(Ecc key, byte[] out, long[] outLen) { + + runAllCast_fips(); + + return wc_ecc_export_x963(key, out, outLen); + } } diff --git a/src/main/java/com/wolfssl/wolfcrypt/WolfObject.java b/src/main/java/com/wolfssl/wolfcrypt/WolfObject.java index 83c6be0..fae4a17 100644 --- a/src/main/java/com/wolfssl/wolfcrypt/WolfObject.java +++ b/src/main/java/com/wolfssl/wolfcrypt/WolfObject.java @@ -21,6 +21,8 @@ package com.wolfssl.wolfcrypt; +import com.wolfssl.wolfcrypt.Fips; + /** * Loader for the native WolfCrypt implementation. * All classes in this package must inherit from it. @@ -62,6 +64,12 @@ public class WolfObject { /* Load wolfcryptjni library */ System.loadLibrary("wolfcryptjni"); + /* Run FIPS CAST if we are in FIPS mode. Will only forcefully + * be run once - Fips class keeps track of a successful run. */ + if (Fips.enabled) { + Fips.runAllCast_fips(); + } + /* initialize native wolfCrypt library */ init(); }