https://stackoverflow.com/questions/58488774/configure-tomcat-hibernate-to-have-a-cryptographic-provider-supporting-1-2-840-1
23 Aug 2022 10:34:51 李周华 <joey.lee@xxxxxxxxx>:
Hi , guys
I have use the follow openssl commands to create a key pair for android app signing.
Follow this link https://source.android.com/docs/core/ota/sign_builds#manually-generating-keys
# generate RSA key
openssl genrsa -3 -out temp.pem 2048
Generating RSA private key, 2048 bit long modulus
....+++
.....................+++
e is 3 (0x3)
# create a certificate with the public part of the key
openssl req -new -x509 -key temp.pem -out releasekey.x509.pem -days 10000 -subj '/C=US/ST=California/L=San Narciso/O=Yoyodyne, Inc./OU=Yoyodyne Mobility/CN=Yoyodyne/emailAddress=yoyodyne@xxxxxxxxxxx'
# create a PKCS#8-formatted version of the private key
openssl pkcs8 -in temp.pem -topk8 -outform DER -out releasekey.pk8 -nocrypt
# securely delete the temp.pem file
shred --remove temp.pem
The key file was successfully generated, but when I compile the entire project signature app, the following error is reported:
java.security.NoSuchAlgorithmException: 1.2.840.113549.1.5.13 SecretKeyFactory not available
at java.base/javax.crypto.SecretKeyFactory.<init>(SecretKeyFactory.java:122)
at java.base/javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:168)
at com.android.signapk.SignApk.decryptPrivateKey(SignApk.java:250)
at com.android.signapk.SignApk.readPrivateKey(SignApk.java:272)
at com.android.signapk.SignApk.main(SignApk.java:1210)
My ubuntu version is 20.04.4 LTS
openjdk version is 11.0.15 2022-04-19
openssl version is 1.1.1r-dev built on Mon Aug 22 11:19:51 2022 UTC
Any help is welcome.
******************************************************
努比亚技术有限公司 基础框架团队 李周华
联系电话:18706866323
地址:西安市高新唐延南路10号中兴产业园A座101
Email:0016003031@xxxxxxxxx
******************************************************