The key generation tool for genesis can generate public encryption keys for anonymity revokers and public signature keys for identity providers needed for genesis. The tool can be found in ../src/bin/keygen-genesis.rs.
The keygen tool can
- generate public keys for anonymity revokers via the subcommand
keygen-ar
- generate public keys for identity providers via the subcommand
keygen-ip
This tool only outputs the public keys to be used in genesis.
To see all the options use the --help
option at different levels.
The tool generates keys deterministically from the given seed file.
Generate keys for an anonymity revoker. The following options are supported
--ar-identity
is the integer identifying the anonymity revoker on the chain. This needs to be unique among anonymity revokers. It has meaning in cryptographic protocols (it is used as the evaluation point of the sharing polynomial) and so it must be non-zero.--description
string, a free-form description containing information that users will want to see about the anonymity revoker--name
a string, a simple identifier of the anonymity revoker. Chosen by themselves.--url
a URL with the website of the anonymity revoker--seed
, a filename containing a seed.--out-pub
, a filename where the public data will be emitted. This is the data that must go to the chain.
Generate keys for the identity provider. The following options are supported
--ip-identity
is the integer identifying the identity provider on the chain. This needs to be unique among identity providers. It has no special meaning--description
string, a free-form description containing information that users will want to see about the identity provider--name
a string, a simple identifier of the identity provider. Chosen by themselves.--url
a URL with the website of the identity provider--seed
, a filename containing a seed.--out-pub
, a filename where the public data will be emitted. This is the data that must go to the chain.--bound
, upper bound on the number of length of vectors the identity provider's key. See the Pointcheval-Sanders signatures scheme for details of what this means. This defaults to 30 which is sufficient for the current numbers.
In the following it is assumed that the seed file is called bytes.txt and has the content 12345678901234567890123456789012345678904989849123456789012345678901231
.
Run
./keygen-genesis keygen-ar --seed bytes.txt --ar-identity 1 --name "Some name" --description "Some description" --url "Some url" --out-pub ar_keys_pub.json
Wrote public keys to ar_keys_pub.json.
After running the command above, the content of ar_keys.pub.json will be
{
"v": 0,
"value": {
"arIdentity": 1,
"arDescription": {
"name": "Some name",
"url": "Some url",
"description": "Some description"
},
"arPublicKey": "8a826aeb7854d8dfb7ed47db8dba35dd34f455d0a09053decf175a432a652854bbdbc91e4f547a1981c87fadb7e62b8b848410db6555ff8b6e48d9b6da5c7e79470e6d8c39538736df15b89972063f7849d0b7fb63422ca8f8129c58c1c1a2a5"
}
}
Run
./keygen-genesis keygen-ip --seed bytes.txt --ip-identity 1 --name "Some name" --description "Some description" --url "Some url" --out-pub "ip_keys_pub.json"
Wrote public keys to ip_keys_pub.json.
After running the command above, the content of ip_keys_pub.json will be
{
"v": 0,
"value": {
"ipIdentity": 1,
"ipDescription": {
"name": "Some name",
"url": "Some url",
"description": "Some description"
},
"ipVerifyKey": "97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb80000001e8a826aeb7854d8dfb7ed47db8dba35dd34f455d0a09053decf175a432a652854bbdbc91e4f547a1981c87fadb7e62b8b874de7c667ccd87ec3d338b261326552e2130d84d6b7fa58dcb379b741b937e6be77c543d4a9f91ae59627386a840c8db554dfc7cff3fee23bacea1fdc7708f777012ed09145c64283e50a025f2212b2055431e9ca65c08fb89f4adac56ecceba530d458e8c09aa99be5894f9292c3514ec74524e97eb6decba16781085638efaa41b0301f9ceb2d3d1dbcb92c9d9b0390e519a90f23aafa1ded83d8373d24793deac24b25fcbf3de93e02d72a85a154bff512ef3615732c159e6c1c6dc5ace8951da663be133df8f2bbc49c48c3dd4ca26012b947e29135bde48fb380f1f758504f12d80bcc4e688776f6a03f5adf0a8a1f34d817b1d0ffdfe0e8ed29586591e92cfb3a0881daeba6fc45172d7aa34f81af77b9f387a01f2075b0972c878c54ad785839058a5604de5c7179fec3de4d7ff4a3035b0852b276f7a3d6ee6c66376e8aa11424f0e42e29949c28fff45e11934092a283ee874777a46f3c8f0ff7a0caee1377ad188f4655f895449a1ff1fb6749ec5185fbb88b150401f0ac77f99ab50a7cab8fa92b8c350e70d90a452310c9a9b5a735697b8e1b0016427eb294345bb96c4a34abf7ffe2f54f304723149984f62a32447f009be195ce9057eca48416362a7f72f37eacf36dacd429b1447785ad769489ddcd02d78ac84e1bd6f22caa6cb20cdc60c189466705192a15877a26535043eac6e06b3200be2ac0930051e6ab0c96b39b8c96dac20ebb0db922d7a2612a399dd4dc889eaf5568ce19873283fba6462fdbba7fe7a1ce8cbc183c297d76b1e0300b2ce1f564ba4a3fa1b8e4a2eeca2363cec1122f14658b64ba7738cc306b6d55070d1a14ddc8def883962570b36c8c78c3de7fe1e6a6df5e222d3da1f0c27accd183afb4dc3f22074ff06e1756e35e8ad9a46f81a89a0cf19ffacd647e2f25dace3ef783304f25fac60ba0826d0546dec5356d9da008f3301fefb852931aeb5942df540179c74686573defc19858851125aaebae190f12987c4805a32e0d522f5bbc39c24ad1dcd7eff716eb992e26cbbc517406402d2e371ec45651438c70faa714d7a957c8f0d2755dde88a05cdf3c4831b2580056b5dfe37eca677690edfb512e38f231374767884a396677b440b6ed59a806f0b11781e96b32acde81f637afb302c2816c3acb214ebd242e7c9a176f9a11b7d776bcf5363af606d5883ff3460a9730b1b3a5389a5490912380c47aa79be04732a004225a1284cfb36fb474135a0d77664f5bd67243513d4f08f26296cc8b81dbf7cd34ac46e1831676515465f86478d0b4747681f392f24b54723f2a742e567f30b1373b60375195e35f428bd49f0a9b4b6053239ee886e39c07b627e72ecfaaf6307232f614b0311feae9cf833d9759f75479f5ac9078618f2de063039abef1b26e5dd717a18749cd7c4db344482040e6f4c949b002e750ae92e6dbcd98b358c35db7955d93ba63641682f16d2b5bf6c872c2e39599a61610349cde1dc3adfb7bd6d8ab1ea6200d0e1429cf096887d5897e146271a7084b6795ef27e4d04f530fc857895a8484aadd74ce4f5b1db36591d75cda58ff48c38653a9fd47cfc417de7cf73ed8274a0d6ec2715a5abec08a6623161553098a2a3434c15fba15c9b0c02a89d09d2e644e8dcd99874f7ce8d7d0768565da741c9bdc7f971f26d53a7128db80bafbe9b301f107f7ba45e06863f367b7802e962cda45c73fc6a671f71d58b9f0cac2dca27f2350a5e20470f0c2e3375f323e3696b2aceb6b3624d67736a55d90d033d60022799bfa272d08436b4fb590b0d9f0b4e4e0bbd6d42632f85efbf28a80464cac447b25a713f37ac3d56da108382e5033772477c4975dcc45d2280f3dc46eb1c9187bece41c2c4a01158828be52a314a929bee0697c4b48091c42cff810f7b93c10b38a6b14634ba61f1468fd9abc4f692ae579460ac7a0212d12c3dc16ab190000001eabfb0f6b045beafd7f7d3eabdeeebd1417308d37b0d5805cec64870a69ff8c5150e9e9d91a0ce06092803ddb082e7e70009cf77342743de3d69461a4ab50a55f0fd3a84ba45ea60c3530bda195f88fee6eafdf0bb3c99e3a6eaa1895ecba3d7da9410cf8dfddc624e166aa6e3525f445c95dab5639ba733f19a56689fcc405591bd81ed5bdc918fd355cbeaeb13f06fd0bf344302145a314a863a3b4784826c9d711dd28ff57cdc2aa45383af7ebdaf7d8139923e46caff72c1d5780b484a18b8c30626c5048c9cd5338f8f9e2594e26854a54ddec906ee19661e6b5c2a26d714ea1a9e245c059ddea1bc0ae446306330ca34d2dda1632769d2eb8aa7728812043cd3cbf0d986b6bdc647cfe5261d409ad41bdf47f26b6367721220e751726ffa0a5d61ff37a435b7f70a09357c4205521ca7103353c43c2bd5534eff252ee040ec294427cb9b8f7a7088bf12cb7976f05a33e2e304fbe72c85b79bef4fef91f2d21ed4d29e4a2fa61fb02f084272cb03b3985d88e98fa5f1f5b0548c19784f1a3be589be63b2520a06b2311f22b5228d966401a026593c400fd82d5a5c53282248b1fca9f643908391f3aa584b9e88c05ab6e848d23030925ef0831860b44b30e5597347f221d4d41bff3bb26c3d01f88b6fc62fca25ef2b94aebaa24237e358059b04e833eb35924251835411fdb6da56c85faba8ce3b2e520f845af65d1e576777249f30914412dfdadbc76239bb213a9a6266851241dc7f1508dba15a989b0069e957e0621cd55e251617942498742fdc56f16988ce6dfc3092d15a075c2a97356fbd57ef3c0e064696c63e3f0f5a8a88d9af153ee2fd43d4c559c48ea5c548ee124a91b5612df4251fcdbc95a6b185dddadf186ec50a2466732ead7453d0b922566fab71ac2c1d57daaf174e0d60aa9de2210fda3b69dca72170f0310c591cddc020e965e3f69ee0fb3ef0febd9cc551d3560bcd4e01f3d150ff06de691d9bd5b83f3b6c59bc67c717f95bcaa3c0323e173b2fc4e3d45534463d310eaf2aca51c6de313317165786528e864f05bda26772a55cba8f8bd5ef0b36c02504da6102a982e884f3fbda7f835d63edce3e3486b787bf787ef37f30dda6d6ae0e5ae74cfed3e38328a61a49586df6f533505dae3f20167b9956aff7693b8c8404fea8797ce6a080d7c2bad46702c8c547619a6f98bbe9cd1e752eebd9846b79964aed4bf38a7297b87b7d292d7b4ba3c77322d68023227b883dbb8a3c201b14d8a42a4f19ff7a26eac58d0134e370f2a6d111b1e0d18dd1febcba4a9b34ee924910add35a6daf5246257d7ff4a2c3de38a68b1131e5900c07d02bac6a59fe4fb5cb56f4a82306f96ef063ed16dfd96422f259961c9c5335699f76b6bbf5d2a65ff832e087d3f7f19236b03ba2d1b18d4d1046d5d74f7d1b417d5de9b0c5849bec98deb673a98be487ca94d52fe3fb1065a997239b219ba43e2467a62b5909056a5a023c6f070c2f0300b3fa9a5cea4c1fb1bede1cc5a240c81692c6013f4810760c9485ae3157396a754e26ef207276e9e0abb546a072f3559ca7c704a00f66ec164c4bcaf2393c48caa9434697cc270953d00b06248e9543f708a1ba8698fa83d929cfa2f3e5eacb4a5fa0b5f26353382f2de2914550f836d89fcf862cf1e949c65481b8fd615d5d2062787a250357649116392451961580d2935942ad6122416ae4eec5d81bb9aead7038e1798967cdabc95fef735d9aa54d82c71019acb4884b94718c5bf8bdd2d89f4726a9f8824a1dab0335ef838ad189e801496826bc43e1c749eee99e8cfb72a19a74684f737bd0549ec8d3d15e8b1a5a3bcd533d8321891d2305af4749f289d75fe28b90bc5728fd9679b843822df59f588651cf5e424952051f23e3a20fe2409d46e2986fc082177a55af5360125e8757037f252cfb1c36728ded48adc607e823a4c3ca8fdf0092096088aff1baf05597fe0d445c6d702d3ee8d0e171924140626aef5af4af3bc7ebb195a8ca8b00569f91bf3521cbfb17ff67934d4b9ccfd7936eae4df95f93192afaa47f37c60ddea11ad9afda582525e0922e901510bd1419a421665c0060bfed7c0e6dd1fa02ea35e9dded79ca7c6fe1ee4c271afd417909b5b7f54a2f6ed1b1da90174ed052ae9c8e6f61b7bf7a5bb6058764917f26dd1a1a3e77fa0212b55ed3132564697c5e2d2c9c33e39359c42e899427c9012e2e1603308b82f270dc8e87d62b254a97ebdb4dc2fc02b3045ffa9f052dfd8b510554cd01e27f0c06d98dadcad314ae5581eb85b2e0ac7588b27f3bc7c2d92d5b9f6cee0cced8d15183b0ebb79d49ed1a88955f4767fce9cd62c82ca8fe5f22f241a4babd977f67d1013bf0afcba86700ba360e61d879c48030a46dd2b8d147b0aaa659bde261206bb439fb521d5a9abe9c10d7a29c16dd1ad1f11645abfea2c999c0548852604a0a9193b8de26bf40b5d127a9e6cc568d0536839d894baae6c39d350e7cccbddfc14d9125807679440926288b2c417b716a5ffe83b92a0cd66e9cde0d6f1d480207240af0d193d50e3997ac102dc7700c6a103093ad855afa7a58e23a18d61d2aab8dc64a6d03fd01f9d05016e7f372720953f7bd97489df095f2b2c08101f609e01f484593ef0e302d244da468bda009dbe4d45bf011ba77d136ba925d2864a6dd673eed587d5b18d952a61f9a25a486e8a3de1d1e87060814e96dacded325e76ea64abba1571a33e0f4cb43c771a57b9cb436615fd35f7e9a44a0a6fb2bda1dd16f5104f6854c7eebc402290bdafa10f9407ccecceadc2e090ffad4ef9af8ec6f4b85f2ee4dbf4cd8026f6d0f72430b0a7abf89e9a93454e8a924cc87dd0568504c95060722bfcfcae9ead5613250244f9b5977e0a12baf32f97bc907aff2d421663c413b2dce9276dd743ba17aef6ca1eae6c57414a43e278c78e9909d47784a7dea6864f822b5fb2cae80fc7d44c92919135e5d589b7d0cf2d195ee321c2959f2abda2dd6a9acb351c27e1c9c7353ac8e1befde13b923f6b632895152b4337011b21175bbaa8b46806c63e020da8c6af9108ec9b219f1efe78336a307a85d602e1fb1fd10f9ef9a6f65cfe8dd77efe9157c0d47d4c3cc3e34a7d10f7f3dd7ac6b3d53cd86c7e02bf5367911e3012e5a8a43d532f702e617976843ff96bd4fa13ffb12d07d12fd5ba534414f5c42b59f60bcd082b5dc2a3b074950bb6d33c84d68139957c789adcf2adedfd2f5b467393346a00f6141f8c6130441966cd5ad32b4471f5fa2c938bffae809c2a2854872ce0142b6ff0938951b3d5880c6fdb5a15d7c4060de08198af5f094e06100b3a5d5e707d6fb67a99c60e17ef4915116229a93d6445e37a87546f563ba03a3430ae7819cf666ffb54e0b97de5376a5cd5db70c07c8176f824951aa05fe42d942e22eee5a27b1987951b70a247991ab57913eac7ad61257c55c67ee3b9236376caeb83f9653fc3e4dc11abd75d70fed06b883942d986750d29329f666c48c300428436eb284b686b597717c8716d32085c629ef984ac864e93b93644fbdeaa540fe8ae86b98f61d302bfc3eae0a57d4ea11148cd4e67ab124dfb336dcae5bf38f1f756a23a17bce39f23b150241df4b8c19d6f4c664d351e122f65741cc10f45058156833b1a3fec3626d5f7e4fbde12edd2b30f9b4db3c8f756410e4b17cf1cc8fc6a00dc7cd6b2124608d11254eeff581506200c8ade41fb364322a88e83b886b4b3b3711dd12ac81124b2b1ea5302b488444bed460e05cd7a0c51d5db040d16ad3f11aa8a8964091ac498c345fdd32274026950019bbc7e78bd0dbeee291dc36de406363fd90edc3a7679d8ba9b128101453564e4c3558d4c071ce421e3eecb8557067b0d2f3826ca7e9f9652a59f6f094a304c59d5d247bba40ea1490c426caf114cda86a1c092055045971fc167d217e2e843be5c49fdb5bcd4e3825a25b2249cd1f31b593fc986df29a5e1fe33391656e6c4eaa2d210343167b4e43b9ef93c6608f55f3ed3a657473cc38d6bf410fc3459b3d5fdcff0ff7e2389dd663b7eaf3f61b746f644009d4f3e6f39d3879989e1f6522c33957143161ff285342df4efb17a92ff205154b9e5655ed28927c20d16775bf090a214a095b81fbc944932d8c300f540220e50ec5aa1a252fc57ac6a6ea152b1d5dc8b8db9af328d43260c",
"ipCdiVerifyKey": "fbee3dd6c1f44207528876e0d71613e724ebdb2fffef07df44beedfebd65f88f"
}
}