Skip to content

Instantly share code, notes, and snippets.

@mafrasi2
Created November 30, 2015 03:57
Show Gist options
  • Save mafrasi2/ed754ff93af54391256a to your computer and use it in GitHub Desktop.
Save mafrasi2/ed754ff93af54391256a to your computer and use it in GitHub Desktop.
bytevector_t data = receive(1024);
ASN1Structure dh_params = ASN1Structure::parseDER(dat);
// dh_params[0] ist die Sequence und dh_params[0][0] ist das
// 0te Element der Sequence, also der ASN1Integer p
mpz_class p = dh_params[0][0].get_mpz();
mpz_class g = dh_params[0][1].get_mpz();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment