{"action":"created","issue":{"url":"https://api.github.com/repos/ricmoo/GMEllipticCurveCrypto/issues/8","labels_url":"https://api.github.com/repos/ricmoo/GMEllipticCurveCrypto/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/ricmoo/GMEllipticCurveCrypto/issues/8/comments","events_url":"https://api.github.com/repos/ricmoo/GMEllipticCurveCrypto/issues/8/events","html_url":"https://github.com/ricmoo/GMEllipticCurveCrypto/issues/8","id":54711077,"number":8,"title":"Can`t verify ECDSA signature generated by Bouncycatle in Java","user":{"login":"bpalermo","id":4821983,"avatar_url":"https://avatars.githubusercontent.com/u/4821983?v=3","gravatar_id":"","url":"https://api.github.com/users/bpalermo","html_url":"https://github.com/bpalermo","followers_url":"https://api.github.com/users/bpalermo/followers","following_url":"https://api.github.com/users/bpalermo/following{/other_user}","gists_url":"https://api.github.com/users/bpalermo/gists{/gist_id}","starred_url":"https://api.github.com/users/bpalermo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpalermo/subscriptions","organizations_url":"https://api.github.com/users/bpalermo/orgs","repos_url":"https://api.github.com/users/bpalermo/repos","events_url":"https://api.github.com/users/bpalermo/events{/privacy}","received_events_url":"https://api.github.com/users/bpalermo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"ricmoo","id":975687,"avatar_url":"https://avatars.githubusercontent.com/u/975687?v=3","gravatar_id":"","url":"https://api.github.com/users/ricmoo","html_url":"https://github.com/ricmoo","followers_url":"https://api.github.com/users/ricmoo/followers","following_url":"https://api.github.com/users/ricmoo/following{/other_user}","gists_url":"https://api.github.com/users/ricmoo/gists{/gist_id}","starred_url":"https://api.github.com/users/ricmoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricmoo/subscriptions","organizations_url":"https://api.github.com/users/ricmoo/orgs","repos_url":"https://api.github.com/users/ricmoo/repos","events_url":"https://api.github.com/users/ricmoo/events{/privacy}","received_events_url":"https://api.github.com/users/ricmoo/received_events","type":"User","site_admin":false},"milestone":null,"comments":8,"created_at":"2015-01-18T21:35:01Z","updated_at":"2015-01-19T11:02:16Z","closed_at":"2015-01-19T06:06:15Z","body":"Hi,\r\n\r\nI`m trying to verify a signature generate in Java using:\r\n\r\n`- (BOOL)hashSHA256AndVerifyEncodedSignature: (NSData*)encodedSignature forData: (NSData*)data`\r\n\r\nBut,\r\n\r\n`NSData *derDecodeSignature(NSData *der, int keySize)`\r\n\r\nalways returns `nil`.\r\n\r\nI'm using `GMEllipticCurveSecp256r1` and my encoded signature size is 88 bytes.\r\n\r\nCould you help me?\r\n"},"comment":{"url":"https://api.github.com/repos/ricmoo/GMEllipticCurveCrypto/issues/comments/70476736","html_url":"https://github.com/ricmoo/GMEllipticCurveCrypto/issues/8#issuecomment-70476736","issue_url":"https://api.github.com/repos/ricmoo/GMEllipticCurveCrypto/issues/8","id":70476736,"user":{"login":"bpalermo","id":4821983,"avatar_url":"https://avatars.githubusercontent.com/u/4821983?v=3","gravatar_id":"","url":"https://api.github.com/users/bpalermo","html_url":"https://github.com/bpalermo","followers_url":"https://api.github.com/users/bpalermo/followers","following_url":"https://api.github.com/users/bpalermo/following{/other_user}","gists_url":"https://api.github.com/users/bpalermo/gists{/gist_id}","starred_url":"https://api.github.com/users/bpalermo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpalermo/subscriptions","organizations_url":"https://api.github.com/users/bpalermo/orgs","repos_url":"https://api.github.com/users/bpalermo/repos","events_url":"https://api.github.com/users/bpalermo/events{/privacy}","received_events_url":"https://api.github.com/users/bpalermo/received_events","type":"User","site_admin":false},"created_at":"2015-01-19T11:02:16Z","updated_at":"2015-01-19T11:02:16Z","body":"Could be useful\r\n\r\n```\r\n/**\r\n *  The public key DER encoded in base64\r\n */\r\n@property (nonatomic, strong) NSString *encodedPublicKeyBase64;\r\n```\r\n\r\n```\r\n- (void)setEncodedPublicKeyBase64:(NSString *)encodedPublicKeyBase64 {\r\n    NSData *decoded = [[NSData alloc] initWithBase64EncodedString:encodedPublicKeyBase64 options:0];\r\n    \r\n    int keyLength = keyLength = 1 + 2 * self.bits / 8;\r\n    NSData *publicKey = [decoded subdataWithRange:NSMakeRange([decoded length] - keyLength, keyLength)];\r\n    [self setPublicKey:publicKey];\r\n}\r\n```"}}