출처 : https://torstenbuechner.wordpress.com/2013/02/05/rsa-sending-encrypted-messages-from-ios-to-python/
Generate keys with OpenSSL:
The first step is to generate self signed public and private key with a key length of 2048 that will not expire (or at least not within the next 10 years).
openssl req -x509 -out public_key.der -outform der -new -newkey rsa:2048 -keyout private_key.pem -days 3650
You are done and you end up with two files: public_key.der and private_key.pem which are the keys for encryption and decryption.
This command is actually 3 merged commands (but you do not need this)
1) create a private key
1 | openssl genrsa -out private_key.pem 2048 |
2) create a certificate request (follow the prompts to enter information)
1 | openssl req -new -out cert.csr -key private_key.pem |
3) self-signed root certificate
openssl x509 -req -
in
cert.csr -out public_key.der -outform der -signkey private_key.pem -days 3650
'iPhone Dev' 카테고리의 다른 글
일정시간 지난 후 실행 (0) | 2016.03.23 |
---|---|
textview detect backspace (0) | 2015.03.31 |
apns 인증서 갱신 (0) | 2015.03.18 |
xcode6 pre compile header 사용 (0) | 2015.01.22 |
ios8 registerforremotenotificationtypes (0) | 2014.12.02 |