{"action":"created","issue":{"url":"https://api.github.com/repos/ethereum/ethereumj/issues/363","repository_url":"https://api.github.com/repos/ethereum/ethereumj","labels_url":"https://api.github.com/repos/ethereum/ethereumj/issues/363/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/ethereumj/issues/363/comments","events_url":"https://api.github.com/repos/ethereum/ethereumj/issues/363/events","html_url":"https://github.com/ethereum/ethereumj/pull/363","id":144683714,"number":363,"title":"Generalizations to ECKey","user":{"login":"dwhjames","id":470008,"avatar_url":"https://avatars.githubusercontent.com/u/470008?v=3","gravatar_id":"","url":"https://api.github.com/users/dwhjames","html_url":"https://github.com/dwhjames","followers_url":"https://api.github.com/users/dwhjames/followers","following_url":"https://api.github.com/users/dwhjames/following{/other_user}","gists_url":"https://api.github.com/users/dwhjames/gists{/gist_id}","starred_url":"https://api.github.com/users/dwhjames/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwhjames/subscriptions","organizations_url":"https://api.github.com/users/dwhjames/orgs","repos_url":"https://api.github.com/users/dwhjames/repos","events_url":"https://api.github.com/users/dwhjames/events{/privacy}","received_events_url":"https://api.github.com/users/dwhjames/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2016-03-30T18:40:42Z","updated_at":"2016-04-21T23:30:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ethereum/ethereumj/pulls/363","html_url":"https://github.com/ethereum/ethereumj/pull/363","diff_url":"https://github.com/ethereum/ethereumj/pull/363.diff","patch_url":"https://github.com/ethereum/ethereumj/pull/363.patch"},"body":"The primary motivation here is to generalize the\r\ncryptography routines in ECKey so that the\r\nJava Cryptography Architecture with pluggable\r\nproviders can be used.\r\nThis is especially relevant for situations where\r\nthe private key material is not resident in\r\nJVM process memory space, and instead held in\r\na hardware security module (HSM).\r\n\r\nTo enable this, the private member\r\n```java\r\nprivate BigInteger priv;\r\n```\r\nhas been replaced with an abstract private key\r\nto encapsulate the private key material.\r\n```java\r\nprivate final PrivateKey privKey;\r\n```\r\n\r\nOne additional private member has been added\r\n```java\r\nprivate final Provider provider;\r\n```\r\nwhich pins the provider to use when computing\r\nECDSA signature with the private key.\r\n\r\nAll other changes to ECKey here follow from these\r\ntwo changes.\r\n\r\nI believe the public interface of ECKey has been\r\npreserved here, although I do have followup\r\nsuggestions for changes to the public interface.\r\n\r\nAnd existing code-paths will effectively remain\r\nidentical. The BouncyCastle (well, SpongyCastle)\r\ncryptography will still be used if the\r\nuser does not elect to override it with a\r\ndifferent security provider.\r\n\r\nThe line and branch test coverage has been increased\r\nin ECKey as well."},"comment":{"url":"https://api.github.com/repos/ethereum/ethereumj/issues/comments/213159005","html_url":"https://github.com/ethereum/ethereumj/pull/363#issuecomment-213159005","issue_url":"https://api.github.com/repos/ethereum/ethereumj/issues/363","id":213159005,"user":{"login":"dwhjames","id":470008,"avatar_url":"https://avatars.githubusercontent.com/u/470008?v=3","gravatar_id":"","url":"https://api.github.com/users/dwhjames","html_url":"https://github.com/dwhjames","followers_url":"https://api.github.com/users/dwhjames/followers","following_url":"https://api.github.com/users/dwhjames/following{/other_user}","gists_url":"https://api.github.com/users/dwhjames/gists{/gist_id}","starred_url":"https://api.github.com/users/dwhjames/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwhjames/subscriptions","organizations_url":"https://api.github.com/users/dwhjames/orgs","repos_url":"https://api.github.com/users/dwhjames/repos","events_url":"https://api.github.com/users/dwhjames/events{/privacy}","received_events_url":"https://api.github.com/users/dwhjames/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T23:30:56Z","updated_at":"2016-04-21T23:30:56Z","body":"I’ve just tacked on another commit, dd053ac, to clean up the handling of `ECKey` throughout the codebase. As this PR has been hanging out for a while, I thought I’d get it all done in one PR."}}