需要用到工具opensll(现在版本的kali里面会自带openssl)

Pem文件分析:其中每个元素对应的RSA中的元素

私钥

RSAPrivateKey ::= SEQUENCE {

version Version,

modulus INTEGER, -- n

publicExponent INTEGER, -- e

privateExponent INTEGER, -- d

prime1 INTEGER, -- p

prime2 INTEGER, -- q

exponent1 INTEGER, -- d mod (p-1)

exponent2 INTEGER, -- d mod (q-1)

coefficient INTEGER, -- (inverse of q) mod p

otherPrimeInfos OtherPrimeInfos OPTIONAL

}

公钥

RSAPublicKey ::= SEQUENCE {

modulus INTEGER, -- n #合数n

publicExponent INTEGER – e #公开幂e

}

因此可以通过openssl对pem文件进行查看分析【基本查看方式openssl rsa –pubin –in pubkey.pem –text -modulus】,比如medium的结果如下

CTF中RSA题目的pem文件处理

 Hard的结果如下

CTF中RSA题目的pem文件处理

相关文章:

  • 2022-02-06
  • 2022-12-23
  • 2021-08-23
  • 2022-12-23
  • 2021-07-07
  • 2021-10-29
  • 2022-12-23
  • 2021-07-13
猜你喜欢
  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2021-04-24
相关资源
相似解决方案