Tôi muốn tạo khóa với RSA và AES 256 GCM nhưng tôi luôn gặp lỗi sau:
$ openssl genpkey -out mkey.pem -aes-256-gcm -algorithm rsa
.........................++++++
..............++++++
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
Error writing key
140735190483024:error:0D0A7072:asn1 encoding routines:PKCS5_pbe2_set_iv:error setting cipher params:p5_pbev2.c:133:
140735190483024:error:2307D00D:PKCS12 routines:PKCS8_encrypt:ASN1 lib:p12_p8e.c:86:
Khi tôi cố gắng sử dụng aes-256-ctr
Tôi cũng gặp lỗi nhưng hơi khác:
$ openssl genpkey -out mkey.pem -aes-256-ctr -algorithm rsa
.................++++++
.....++++++
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
Error writing key
140735190483024:error:0D0A706C:asn1 encoding routines:PKCS5_pbe2_set_iv:cipher has no object identifier:p5_pbev2.c:104:
140735190483024:error:2307D00D:PKCS12 routines:PKCS8_encrypt:ASN1 lib:p12_p8e.c:86:
Phiên bản OpenSSL OpenSSL 1.0.2g 1 Mar 2016
. Mac OS X 10.11.