{"action":"created","issue":{"url":"https://api.github.com/repos/bitcoin/secp256k1/issues/246","labels_url":"https://api.github.com/repos/bitcoin/secp256k1/issues/246/labels{/name}","comments_url":"https://api.github.com/repos/bitcoin/secp256k1/issues/246/comments","events_url":"https://api.github.com/repos/bitcoin/secp256k1/issues/246/events","html_url":"https://github.com/bitcoin/secp256k1/issues/246","id":72215144,"number":246,"title":"Ought secp256k1_ec_privkey_import() also indicate whether the key is compressed? ","user":{"login":"afk11","id":5617245,"avatar_url":"https://avatars.githubusercontent.com/u/5617245?v=3","gravatar_id":"","url":"https://api.github.com/users/afk11","html_url":"https://github.com/afk11","followers_url":"https://api.github.com/users/afk11/followers","following_url":"https://api.github.com/users/afk11/following{/other_user}","gists_url":"https://api.github.com/users/afk11/gists{/gist_id}","starred_url":"https://api.github.com/users/afk11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afk11/subscriptions","organizations_url":"https://api.github.com/users/afk11/orgs","repos_url":"https://api.github.com/users/afk11/repos","events_url":"https://api.github.com/users/afk11/events{/privacy}","received_events_url":"https://api.github.com/users/afk11/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-30T16:35:47Z","updated_at":"2015-04-30T16:49:45Z","closed_at":"2015-04-30T16:49:45Z","body":"When exporting a private key, the compressed flag is required to create the correct DER key. \r\n\r\nI noticed that `secp256k1_ec_privkey_import()` only takes a pointer for a secret key. I think it should take an `int *` to inform whether the key should be serialized to its compressed representation. \r\n\r\nI'll try have a look see if it's a straightforward change, though my C isn't the best. Does this seem worthwhile, or was there perhaps a reason it doesn't do this? "},"comment":{"url":"https://api.github.com/repos/bitcoin/secp256k1/issues/comments/97876214","html_url":"https://github.com/bitcoin/secp256k1/issues/246#issuecomment-97876214","issue_url":"https://api.github.com/repos/bitcoin/secp256k1/issues/246","id":97876214,"user":{"login":"afk11","id":5617245,"avatar_url":"https://avatars.githubusercontent.com/u/5617245?v=3","gravatar_id":"","url":"https://api.github.com/users/afk11","html_url":"https://github.com/afk11","followers_url":"https://api.github.com/users/afk11/followers","following_url":"https://api.github.com/users/afk11/following{/other_user}","gists_url":"https://api.github.com/users/afk11/gists{/gist_id}","starred_url":"https://api.github.com/users/afk11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afk11/subscriptions","organizations_url":"https://api.github.com/users/afk11/orgs","repos_url":"https://api.github.com/users/afk11/repos","events_url":"https://api.github.com/users/afk11/events{/privacy}","received_events_url":"https://api.github.com/users/afk11/received_events","type":"User","site_admin":false},"created_at":"2015-04-30T16:49:45Z","updated_at":"2015-04-30T16:49:45Z","body":"I see - I haven't looked much at it's use in Bitcoin Core. I ask because without it, other implementations must track state elsewhere. Being able to import the DER key and immediately do `secp256k1_ec_pubkey_create(..., seckey, compressed)` "}}