{"action":"opened","issue":{"url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/6380","labels_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/6380/labels{/name}","comments_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/6380/comments","events_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/6380/events","html_url":"https://github.com/lionheart/openradar-mirror/issues/6380","id":110872710,"number":6380,"title":"23063476: Header comments in QCCRSASmallCryptor(T) are incorrect.","user":{"login":"openradar-mirror","id":13605213,"avatar_url":"https://avatars.githubusercontent.com/u/13605213?v=3","gravatar_id":"","url":"https://api.github.com/users/openradar-mirror","html_url":"https://github.com/openradar-mirror","followers_url":"https://api.github.com/users/openradar-mirror/followers","following_url":"https://api.github.com/users/openradar-mirror/following{/other_user}","gists_url":"https://api.github.com/users/openradar-mirror/gists{/gist_id}","starred_url":"https://api.github.com/users/openradar-mirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openradar-mirror/subscriptions","organizations_url":"https://api.github.com/users/openradar-mirror/orgs","repos_url":"https://api.github.com/users/openradar-mirror/repos","events_url":"https://api.github.com/users/openradar-mirror/events{/privacy}","received_events_url":"https://api.github.com/users/openradar-mirror/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/classification:other%20bug","name":"classification:other bug","color":"e11d21"},{"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/reproducible:always","name":"reproducible:always","color":"5319e7"},{"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/status:open","name":"status:open","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/lionheart/openradar-mirror/milestones/49","html_url":"https://github.com/lionheart/openradar-mirror/milestones/Sample%20Code","labels_url":"https://api.github.com/repos/lionheart/openradar-mirror/milestones/49/labels","id":1237658,"number":49,"title":"Sample Code","description":null,"creator":{"login":"openradar-mirror","id":13605213,"avatar_url":"https://avatars.githubusercontent.com/u/13605213?v=3","gravatar_id":"","url":"https://api.github.com/users/openradar-mirror","html_url":"https://github.com/openradar-mirror","followers_url":"https://api.github.com/users/openradar-mirror/followers","following_url":"https://api.github.com/users/openradar-mirror/following{/other_user}","gists_url":"https://api.github.com/users/openradar-mirror/gists{/gist_id}","starred_url":"https://api.github.com/users/openradar-mirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openradar-mirror/subscriptions","organizations_url":"https://api.github.com/users/openradar-mirror/orgs","repos_url":"https://api.github.com/users/openradar-mirror/repos","events_url":"https://api.github.com/users/openradar-mirror/events{/privacy}","received_events_url":"https://api.github.com/users/openradar-mirror/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":0,"state":"open","created_at":"2015-08-03T06:25:48Z","updated_at":"2015-10-11T18:01:57Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-10-11T18:01:57Z","updated_at":"2015-10-11T18:01:57Z","closed_at":null,"body":"#### Description\n\nIn the headers for QCCRSASmallCryptor and QCCRSASmallCryptorT, there are comments on the init methods as follows:\n\n- (id)initToEncryptSmallInputData:(NSData *)smallInputData key:(SecKeyRef)key;      // must be the *private* key\n- (id)initToDecryptSmallInputData:(NSData *)smallInputData key:(SecKeyRef)key;      // must be the *public*  key\n\nBest I can tell, these comments are reversed. In fact, initToEncrypt: requires the *public* key and initToDecrypt: requires the *private* key. At least, an encryption operation fails when trying to use a private key for encryption with CSSMERR_CSP_INVALID_KEY_CLASS.\n\nIncidentally, I’m trying to use a public key for decryption, which OpenSSL supports using its RSA_public_decrypt() function. Filed rdar://23063471 for that.\n\n-\nProduct Version: CryptoCompatibility Version 1.0\nCreated: 2015-10-11T17:58:39.317960\nOriginated: 2015-10-11T11:58:00\nOpen Radar Link: http://www.openradar.me/23063476"}}