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YCcYTC3x
6+I9Qi0G
-----END CERTIFICATE-----
certchain
- Gets the Root Cert-Chain
Usage
> polykey keys certchain
encrypt
- Encrypts a file with the Root keypair.
- Requires the filePath and NodeID as parameters.
Usage:
> polykey keys encrypt /home/addievo/Desktop/Work/Polykey-CLI/random2.txt vctg4j8988mkobuvruaj2ijmij6jinvk8nf714f0s11kq3blc8g00
Encrypted data: "pã}z}^ÄRÈ\u001bÛ7/+Ì\rRÕ\u0003âÍ®\u008eêÎP©Eý±2?\u001aláí.ôöxV\u0007uÖ«\u0089\u007f»y.Ê"
decrypt
- Decrypts the encrypted file.
- Requires filePath and NodeID (current node) which encrypted the file.
Usage:
> polykey keys decrypt /filePath nodeID
keypair
- Exports the private key JWE and public key JWK
Usage:
> polykey keys keypair
✔ Enter new password … *
✔ Confirm new password … *
publicKey {"alg":"EdDSA","kty":"OKP","crv":"Ed25519","x":"H7meDILtGSgojrUgpTBTkyK9cA3Y_gWr6QNE2IdCeFk","ext":true,"key_ops":["verify"]}
privateKey {"ciphertext":"l-6itRP2FtVWBvGVjS56P497WJsS8fpmiyKlaT8ohOg_-BT2Jz-I8pLSqrsJdieusIkVvjLrHkIzjI4CCVvFW37iV5mMiH18uGvNmHeQZfrHK701dck18IlqffuE6wxSd1bzi2BAvYTGl5aCuE8qR2SAcFfwBUCOvvkC0NDNi5S-L5G9dxlooWLtoU5u90Mfp5re2RVIyoT8Sa6E4smU91418E7_poSOQt6tl0Ny9MeV6sAHdKE","iv":"F87gVlMZM_wvcwl4IWXfI4F7I6QIHGTq","tag":"VJCuy2YQru7OMHHPTTOxRA","protected":"eyJhbGciOiJBcmdvbjJpZC0xLjMiLCJjdHkiOiJqd2sranNvbiIsImVuYyI6IlhDaGFDaGEyMC1Qb2x5MTMwNS1JRVRGIiwibWVtIjoyNjg0MzU0NTYsIm9wcyI6Mywic2FsdCI6InJSckVCTjA2bkd4UmJpdjlHRlNua2cifQ"}
password
- Resets the Polykey agent password.
- Requires authentication
Usage:
> polykey keys password
✔ Enter new password … *
✔ Confirm new password … *
public
- Subset of keypair, returns only the JWK
- Requires authentication
Usage:
> polykey keys public
✔ Enter new password … *
✔ Confirm new password … *
private
- Subset of keypair, returns only the JWE
- Requires authentication
Usage:
> polykey keys private
✔ Enter new password … *
✔ Confirm new password … *
renew
- Renews your public and private key
- Requires authentication
Usage:
> polykey keys renew
✔ Enter new password … *
✔ Confirm new password … *
> polykey keys keypair
Key {"alg":"EdDSA","kty":"OKP","crv":"Ed25519","x":"Jj9iDoV7IWPV3gj65exxVNPpX5-zz_W-uPSOaGZvHxM","ext":true,"key_ops":["verify"]}
privateKey {"ciphertext":"tJ1Q_CZnCKHpcZEgrdZGwdz9Clw9FXR8_NZt8Kz1r-2jYF5dVqTbca-qYHUFJL-Sq2WkzObw_HNfPNVpEXl_OquzaqOUuB7lF1MRgJeINZxjpy9zDcHDIniQR7QxGVafFAoZLJLPsQ_WjpPMTEmfLtsI5wpfH5IjflPWGqJTt-l8FeZzZT5FO6ZHJoEKzPYe6aYbfHusyDa9oCfUXTGzRfrPrlh1hKSF4xL4z92XOiTqBZlX118","iv":"a2RTJr848wjZoe-GXH7Mpl-mwdLWZoyE","tag":"jt2KpzM4PKTEqHLoaGA8wQ","protected":"eyJhbGciOiJBcmdvbjJpZC0xLjMiLCJjdHkiOiJqd2sranNvbiIsImVuYyI6IlhDaGFDaGEyMC1Qb2x5MTMwNS1JRVRGIiwibWVtIjoyNjg0MzU0NTYsIm9wcyI6Mywic2FsdCI6InNtWEhYMGxKektHblhFeTRPaWJzT3cifQ"}
reset
- Resets the root keypair
Usage:
> polykey keys reset
sign
- Sign a file with the root KeyPair
- Filepath is a required parameter
Usage:
> polykey keys sign /home/addievo/Desktop/Work/Polykey-CLI/random.txt
Signature: "xØg»³ðÕi65ÕFéö~}\u0089(\tÇdí\u0080â\u000e\u009c)ÊUË\u0092A÷\u00178XJå}½\u008d]ýÂ=ø!ÒDa=\`lz¼Úߤ!\u0085ô2ò\t"
verify
- Verifies a signature of a target node, when provided a file path
- Filepath is a required parameter
Usage:
polykey keys verify /filePath