iOS Reverse cryptography

Source: Internet
Author: User
Tags openssl rsa csr certificate

Cryptographic Science

1.HASH hashing (hash) function
Irreversible (cannot be used for encryption and decryption)
A binary data with only one hash value

2. Asymmetric RSA
Because it is a simple mathematical calculation, so the efficiency of encryption is low, generally used to encrypt the core (small data)

    • Public key encryption, private key decryption
    • Private key encryption, public key decryption

3. Symmetry

    • Des
    • 3DES
    • Aes

      Openssl

      1. Generate the private key:

      openssl genrsa -out private.pem 521


      View:

      cat private.pem


      2. The public key is calculated from the private key:

      openssl rsa -in private.pem -out public.pem -pubout

      View:

      cat public.pem


      3. For easy viewing, you can output text:

      openssl rsa -in private.pem -text -out private.txt

Example: IOS CSR certificate (public key)

Keychain Request CSR certificate, view in Terminal:

cat CertificateSigningRequest.certSigningRequest

Displays a bunch of base64 encoded strings:

    • More knowledge of cryptography can be self-Baidu
    • Reference articles
    • https://www.jianshu.com/p/d9cd97c77549
    • https://www.jianshu.com/p/ad29445eb91c

iOS Reverse cryptography

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.