{
  "contractName": "RSAVerify",
  "abi": [],
  "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a72305820df2ca05116f6cf1ceaecc055ce83509e9b4551ba05c2a123d42d9ce355a736050029",
  "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a72305820df2ca05116f6cf1ceaecc055ce83509e9b4551ba05c2a123d42d9ce355a736050029",
  "sourceMap": "88:459:11:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24",
  "deployedSourceMap": "88:459:11:-;;;;;;;;",
  "source": "pragma solidity >0.4.23;\n\nimport \"../BytesUtils.sol\";\nimport \"./ModexpPrecompile.sol\";\n\nlibrary RSAVerify {\n    /**\n    * @dev Recovers the input data from an RSA signature, returning the result in S.\n    * @param N The RSA public modulus.\n    * @param E The RSA public exponent.\n    * @param S The signature to recover.\n    * @return True if the recovery succeeded.\n    */\n    function rsarecover(bytes memory N, bytes memory E, bytes memory S) internal view returns (bool, bytes memory) {\n        return ModexpPrecompile.modexp(S, E, N);\n    }\n}\n",
  "sourcePath": "/home/user/Dropbox/projects/enssec/contracts/algorithms/RSAVerify.sol",
  "ast": {
    "absolutePath": "/home/user/Dropbox/projects/enssec/contracts/algorithms/RSAVerify.sol",
    "exportedSymbols": {
      "RSAVerify": [
        3527
      ]
    },
    "id": 3528,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 3503,
        "literals": [
          "solidity",
          ">",
          "0.4",
          ".23"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:11"
      },
      {
        "absolutePath": "/home/user/Dropbox/projects/enssec/contracts/BytesUtils.sol",
        "file": "../BytesUtils.sol",
        "id": 3504,
        "nodeType": "ImportDirective",
        "scope": 3528,
        "sourceUnit": 721,
        "src": "26:27:11",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/user/Dropbox/projects/enssec/contracts/algorithms/ModexpPrecompile.sol",
        "file": "./ModexpPrecompile.sol",
        "id": 3505,
        "nodeType": "ImportDirective",
        "scope": 3528,
        "sourceUnit": 3246,
        "src": "54:32:11",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": null,
        "fullyImplemented": true,
        "id": 3527,
        "linearizedBaseContracts": [
          3527
        ],
        "name": "RSAVerify",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": {
              "id": 3525,
              "nodeType": "Block",
              "src": "489:56:11",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 3520,
                        "name": "S",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3511,
                        "src": "530:1:11",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 3521,
                        "name": "E",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3509,
                        "src": "533:1:11",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 3522,
                        "name": "N",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3507,
                        "src": "536:1:11",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 3518,
                        "name": "ModexpPrecompile",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3245,
                        "src": "506:16:11",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_ModexpPrecompile_$3245_$",
                          "typeString": "type(library ModexpPrecompile)"
                        }
                      },
                      "id": 3519,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "modexp",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 3244,
                      "src": "506:23:11",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes memory,bytes memory,bytes memory) view returns (bool,bytes memory)"
                      }
                    },
                    "id": 3523,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "506:32:11",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
                      "typeString": "tuple(bool,bytes memory)"
                    }
                  },
                  "functionReturnParameters": 3517,
                  "id": 3524,
                  "nodeType": "Return",
                  "src": "499:39:11"
                }
              ]
            },
            "documentation": "@dev Recovers the input data from an RSA signature, returning the result in S.\n@param N The RSA public modulus.\n@param E The RSA public exponent.\n@param S The signature to recover.\n@return True if the recovery succeeded.",
            "id": 3526,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "rsarecover",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 3512,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3507,
                  "name": "N",
                  "nodeType": "VariableDeclaration",
                  "scope": 3526,
                  "src": "398:14:11",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 3506,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "398:5:11",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3509,
                  "name": "E",
                  "nodeType": "VariableDeclaration",
                  "scope": 3526,
                  "src": "414:14:11",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 3508,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "414:5:11",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3511,
                  "name": "S",
                  "nodeType": "VariableDeclaration",
                  "scope": 3526,
                  "src": "430:14:11",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 3510,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "430:5:11",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "397:48:11"
            },
            "returnParameters": {
              "id": 3517,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3514,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 3526,
                  "src": "469:4:11",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 3513,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "469:4:11",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3516,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 3526,
                  "src": "475:12:11",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 3515,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "475:5:11",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "468:20:11"
            },
            "scope": 3527,
            "src": "378:167:11",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 3528,
        "src": "88:459:11"
      }
    ],
    "src": "0:548:11"
  },
  "legacyAST": {
    "absolutePath": "/home/user/Dropbox/projects/enssec/contracts/algorithms/RSAVerify.sol",
    "exportedSymbols": {
      "RSAVerify": [
        3527
      ]
    },
    "id": 3528,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 3503,
        "literals": [
          "solidity",
          ">",
          "0.4",
          ".23"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:11"
      },
      {
        "absolutePath": "/home/user/Dropbox/projects/enssec/contracts/BytesUtils.sol",
        "file": "../BytesUtils.sol",
        "id": 3504,
        "nodeType": "ImportDirective",
        "scope": 3528,
        "sourceUnit": 721,
        "src": "26:27:11",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/user/Dropbox/projects/enssec/contracts/algorithms/ModexpPrecompile.sol",
        "file": "./ModexpPrecompile.sol",
        "id": 3505,
        "nodeType": "ImportDirective",
        "scope": 3528,
        "sourceUnit": 3246,
        "src": "54:32:11",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": null,
        "fullyImplemented": true,
        "id": 3527,
        "linearizedBaseContracts": [
          3527
        ],
        "name": "RSAVerify",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": {
              "id": 3525,
              "nodeType": "Block",
              "src": "489:56:11",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 3520,
                        "name": "S",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3511,
                        "src": "530:1:11",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 3521,
                        "name": "E",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3509,
                        "src": "533:1:11",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 3522,
                        "name": "N",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3507,
                        "src": "536:1:11",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 3518,
                        "name": "ModexpPrecompile",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3245,
                        "src": "506:16:11",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_ModexpPrecompile_$3245_$",
                          "typeString": "type(library ModexpPrecompile)"
                        }
                      },
                      "id": 3519,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "modexp",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 3244,
                      "src": "506:23:11",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes memory,bytes memory,bytes memory) view returns (bool,bytes memory)"
                      }
                    },
                    "id": 3523,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "506:32:11",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
                      "typeString": "tuple(bool,bytes memory)"
                    }
                  },
                  "functionReturnParameters": 3517,
                  "id": 3524,
                  "nodeType": "Return",
                  "src": "499:39:11"
                }
              ]
            },
            "documentation": "@dev Recovers the input data from an RSA signature, returning the result in S.\n@param N The RSA public modulus.\n@param E The RSA public exponent.\n@param S The signature to recover.\n@return True if the recovery succeeded.",
            "id": 3526,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "rsarecover",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 3512,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3507,
                  "name": "N",
                  "nodeType": "VariableDeclaration",
                  "scope": 3526,
                  "src": "398:14:11",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 3506,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "398:5:11",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3509,
                  "name": "E",
                  "nodeType": "VariableDeclaration",
                  "scope": 3526,
                  "src": "414:14:11",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 3508,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "414:5:11",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3511,
                  "name": "S",
                  "nodeType": "VariableDeclaration",
                  "scope": 3526,
                  "src": "430:14:11",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 3510,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "430:5:11",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "397:48:11"
            },
            "returnParameters": {
              "id": 3517,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3514,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 3526,
                  "src": "469:4:11",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 3513,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "469:4:11",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3516,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 3526,
                  "src": "475:12:11",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 3515,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "475:5:11",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "468:20:11"
            },
            "scope": 3527,
            "src": "378:167:11",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 3528,
        "src": "88:459:11"
      }
    ],
    "src": "0:548:11"
  },
  "compiler": {
    "name": "solc",
    "version": "0.5.0+commit.1d4f565a.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.0.1",
  "updatedAt": "2019-03-12T23:08:21.386Z",
  "devdoc": {
    "methods": {}
  },
  "userdoc": {
    "methods": {}
  }
}