Skip to content

Instantly share code, notes, and snippets.

@alloy
Last active August 29, 2015 14:26

Revisions

  1. alloy revised this gist Aug 1, 2015. 1 changed file with 39 additions and 0 deletions.
    39 changes: 39 additions & 0 deletions crypto.c
    Original file line number Diff line number Diff line change
    @@ -36,3 +36,42 @@ int _ccec_x963_import_priv_size(int arg0) {
    }
    return rax;
    }

    int _ccec_x963_import_pub_size(int arg0) {
    rdi = arg0;
    rax = 0xc0;
    if (rdi <= 0x84) {
    if (rdi <= 0x60) {
    if (rdi != 0x31) {
    if (rdi == 0x39) {
    rax = 0xe0;
    }
    else {
    if (rdi == 0x41) {
    rax = 0x100;
    }
    else {
    rax = 0x0;
    }
    }
    }
    }
    else {
    if (rdi == 0x61) {
    rax = 0x180;
    }
    else {
    rax = 0x0;
    }
    }
    }
    else {
    if (rdi == 0x85) {
    rax = 0x209;
    }
    else {
    rax = 0x0;
    }
    }
    return rax;
    }
  2. alloy created this gist Aug 1, 2015.
    38 changes: 38 additions & 0 deletions crypto.c
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,38 @@
    int _ccec_x963_import_priv_size(int arg0) {
    rdi = arg0;
    rax = 0xc0;
    if (rdi <= 0xc6) {
    if (rdi <= 0x90) {
    if (rdi != 0x49) {
    if (rdi == 0x55) {
    rax = 0xe0;
    }
    else {
    if (rdi == 0x61) {
    rax = 0x100;
    }
    else {
    rax = 0x0;
    }
    }
    }
    }
    else {
    if (rdi == 0x91) {
    rax = 0x180;
    }
    else {
    rax = 0x0;
    }
    }
    }
    else {
    if (rdi == 0xc7) {
    rax = 0x209;
    }
    else {
    rax = 0x0;
    }
    }
    return rax;
    }