{"action":"created","issue":{"url":"https://api.github.com/repos/soyersoyer/SwCrypt/issues/30","repository_url":"https://api.github.com/repos/soyersoyer/SwCrypt","labels_url":"https://api.github.com/repos/soyersoyer/SwCrypt/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/soyersoyer/SwCrypt/issues/30/comments","events_url":"https://api.github.com/repos/soyersoyer/SwCrypt/issues/30/events","html_url":"https://github.com/soyersoyer/SwCrypt/issues/30","id":330612228,"node_id":"MDU6SXNzdWUzMzA2MTIyMjg=","number":30,"title":"RSA decrypt failure on iOS 8.1,please help","user":{"login":"dearwayne","id":3866952,"node_id":"MDQ6VXNlcjM4NjY5NTI=","avatar_url":"https://avatars3.githubusercontent.com/u/3866952?v=4","gravatar_id":"","url":"https://api.github.com/users/dearwayne","html_url":"https://github.com/dearwayne","followers_url":"https://api.github.com/users/dearwayne/followers","following_url":"https://api.github.com/users/dearwayne/following{/other_user}","gists_url":"https://api.github.com/users/dearwayne/gists{/gist_id}","starred_url":"https://api.github.com/users/dearwayne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dearwayne/subscriptions","organizations_url":"https://api.github.com/users/dearwayne/orgs","repos_url":"https://api.github.com/users/dearwayne/repos","events_url":"https://api.github.com/users/dearwayne/events{/privacy}","received_events_url":"https://api.github.com/users/dearwayne/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-08T10:53:09Z","updated_at":"2018-10-15T01:51:03Z","closed_at":null,"author_association":"NONE","body":"Xcode: 9.3.1\r\nCode:\r\n```Swift\r\nlet data = \"Hello Test\".data(using: .utf8)!\r\nlet (privateKey, publicKey) = try! CC.RSA.generateKeyPair(1024)\r\n// encrypt\r\nlet encrypted = try! CC.RSA.encrypt(data, derKey: publicKey, tag: Data(), padding: .pkcs1, digest: .none)\r\n// decrypt\r\ndo {\r\n    let (decrypted,_) = try CC.RSA.decrypt(encrypted, derKey: privateKey, tag: Data(), padding: .pkcs1, digest: .none)\r\n    print(\"decrypted:\\(String(data:decrypted, encoding:.utf8)!)\")\r\n}catch{\r\n    print(\"decrypt fail\")\r\n}\r\n\r\n```\r\ndecypt failure on Simulator:iPhone 5s 8.1,but success on  Simulator: iPhone SE 11.3.\r\n\r\n```C++\r\nCCCryptorStatus \r\nCCRSACryptorDecrypt(\r\n    CCRSACryptorRef privateKey, \r\n    CCAsymetricPadding padding, \r\n    const void *cipherText, \r\n    size_t cipherTextLen,\r\n    void *plainText, \r\n    size_t *plainTextLen, \r\n    const void *tagData, \r\n    size_t tagDataLen, \r\n    CCDigestAlgorithm digestType)\r\n__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0);\r\n```\r\n\r\nIt should be support iOS 5.0 and upper,But why decrypt failure on iOS 8.1?"},"comment":{"url":"https://api.github.com/repos/soyersoyer/SwCrypt/issues/comments/429684812","html_url":"https://github.com/soyersoyer/SwCrypt/issues/30#issuecomment-429684812","issue_url":"https://api.github.com/repos/soyersoyer/SwCrypt/issues/30","id":429684812,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTY4NDgxMg==","user":{"login":"dearwayne","id":3866952,"node_id":"MDQ6VXNlcjM4NjY5NTI=","avatar_url":"https://avatars3.githubusercontent.com/u/3866952?v=4","gravatar_id":"","url":"https://api.github.com/users/dearwayne","html_url":"https://github.com/dearwayne","followers_url":"https://api.github.com/users/dearwayne/followers","following_url":"https://api.github.com/users/dearwayne/following{/other_user}","gists_url":"https://api.github.com/users/dearwayne/gists{/gist_id}","starred_url":"https://api.github.com/users/dearwayne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dearwayne/subscriptions","organizations_url":"https://api.github.com/users/dearwayne/orgs","repos_url":"https://api.github.com/users/dearwayne/repos","events_url":"https://api.github.com/users/dearwayne/events{/privacy}","received_events_url":"https://api.github.com/users/dearwayne/received_events","type":"User","site_admin":false},"created_at":"2018-10-15T01:51:03Z","updated_at":"2018-10-15T01:51:03Z","author_association":"NONE","body":"> Please send me what was the error.\r\n\r\nThe error:\r\nSwCrypt.swift:1139: [decrypt(_:derKey:tag:padding:digest:)] SwCryptTest.CC.CCError: decodeError (-4304)"}}
{"actor":{"display_login":"dearwayne"}}