Skip to content

maojui/Crypto-CTF-Cheatsheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Function

XOR function

xor = lambda a, b: bytes(ai ^ bi for ai, bi in zip(a, b))

Hash

RSA

Factorize modular

Tools

Scripts

with low exponent

with huge exponent

Others attack

Factoring with Partial Information

SSL certificate using python

from Crypto.PublicKey import RSA
key = RSA.importKey(open('publickey.pem','r').read())

Converting Using OpenSSL

Source : stackoverflow

Below commands allow you to convert certificates and keys to different formats to make them compatible with specific types of servers or software.

  • Convert a PEM file to (.der, .crt)
openssl x509 -outform der -in certificate.pem -out certificate.der # DER
openssl x509 -outform der -in certificate.pem -out certificate.crt # CRT
openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt # PFX, P12
openssl crl2pkcs7 -nocrl -certfile certificate.cer -out certificate.p7b -certfile CACert.cer # P7B
  • Convert a DER file (.crt .cer .der) to PEM
openssl x509 -inform der -in certificate.crt -out certificate.pem 
openssl x509 -inform der -in certificate.cer -out certificate.pem 
openssl x509 -inform der -in certificate.der -out certificate.pem
  • Convert a PKCS#12 file (.pfx .p12) containing a private key and certificates to PEM
openssl pkcs12 -in keyStore.pfx -out keyStore.pem -nodes

Cryptosystem

NTRU

Mathmatics

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published