{"action":"created","issue":{"url":"https://api.github.com/repos/mdanter/phpecc/issues/83","labels_url":"https://api.github.com/repos/mdanter/phpecc/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/mdanter/phpecc/issues/83/comments","events_url":"https://api.github.com/repos/mdanter/phpecc/issues/83/events","html_url":"https://github.com/mdanter/phpecc/issues/83","id":67912232,"number":83,"title":"Tracking the things I need to add..","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":[{"url":"https://api.github.com/repos/mdanter/phpecc/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-12T12:58:34Z","updated_at":"2015-04-12T14:45:49Z","closed_at":null,"body":" - [ ] EncryptedMessage.\r\n - [x] NamedCurveSerializer (to ecparams file which contains the OID).\r\n - [ ] NamedCurveExplicitSerializer (to ecparams file which contains the explicitly named parameters).\r\n - [ ] Console: Sign/Verify messages.\r\n - [ ] Console: Generate an ECParams file.\r\n\r\nReading over the parameters specification, https://tools.ietf.org/html/draft-ietf-pkix-ecc-pkalgs-01#section-3, it seems we can specify a hash function to use in the explicit parameters file - otherwise the default should be SHA1. Will \r\n\r\nAlso in that document is a full specification of all the necessary types when generating a parameters file. I'm writing small classes to convert our types into theirs, instead of serializing everything - makes sense in the long run I think. "},"comment":{"url":"https://api.github.com/repos/mdanter/phpecc/issues/comments/92074975","html_url":"https://github.com/mdanter/phpecc/issues/83#issuecomment-92074975","issue_url":"https://api.github.com/repos/mdanter/phpecc/issues/83","id":92074975,"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-12T14:45:49Z","updated_at":"2015-04-12T14:45:49Z","body":"There are some good RFC's when you find them :) Anyway, looking for feedback on how to approach the above tasks! Especially @aztech-dev if you're around, as you've worked with fgrosse/asn.1 already!\r\n\r\nA few off the cuff questions - what is a cofactor, and do we need one? :D Some googling tells me that it restricts the curve if it's not 1. So not sure if we should introduce this to the NistCurves and SecgCurves - it seems a default of one might be fine, but looking for thoughts on this.\r\n\r\nI'm asking because when openssl is dumping curve parameters there's an optional parameter for the cofactor, and for the hashing algorithm.\r\n\r\nSince we haven't started including hash functions in Curves yet, the NamedCurveExplicitSerailizer just sets this to sha1 by default (as per the docs). But I am thinking it's probably a good idea to expose this, since a hashing algorithm is used by EcDH and ECDSA and is as much a domain parameter as your choice of curve/generator/etc.\r\n\r\nI've added a HashAlgorithmOidMapper, which largely mirrors CurveOidMapper, but instead of a curve it returns a callable for the hashing algorithm you gave it (along with the lookup functions for the OID/hash size). Seems we could have a default hashing algorithm just to make things work, but still allow people to customize that. \r\n\r\nWhat lead me to this is trying to dump the ec parameters so that it's compatible with openssl. I'd like to expose a similar feature set (eg, specifying the curve by it's name or the parameters file). \r\n\r\nHave a WIP, but the explicit parameters isn't really working yet: #84 \r\n\r\n@btcdrak @rubensayshi ?"}}