Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
keytool: add sign personal message cli and verify with zklogin (Myste…
…nLabs#14596) ## Description Add a keytool to verify a zklogin signature offchain. ## Test Plan unit test and local cli test ``` target/debug/sui keytool zk-login-sign-personal-message --data hello ✔ 10086 11:54:56 ────────────────────────────────────────────────╮ │ sig │ BQNNMTczMTgwODkxMjU5NTI0MjE3MzYzNDIyNjM3MTc5MzI3MTk0Mzc3MTc4NDQyODI0MTAxODc5NTc5ODQ3NTE5Mzk5NDI4OTgyNTEyNTBNMTEzNzM5NjY2NDU0NjkxMjI1ODIwNzQwODIyOTU5ODUzODgyNTg4NDA2ODE2MTgyNjg1OTM5NzY2OTczMjU4OTIyODA5MTU2ODEyMDcBMQMCTDU5Mzk4NzExNDczNDg4MzQ5OTczNjE3MjAxMjIyMzg5ODAxNzcxNTIzMDMyNzQzMTEwNDcyNDk5MDU5NDIzODQ5MTU3Njg2OTA4OTVMNDUzMzU2ODI3MTEzNDc4NTI3ODczMTIzNDU3MDM2MTQ4MjY1MTk5Njc0MDc5MTg4ODI4NTg2NDk2Njg4NDAzMjcxNzA0OTgxMTcwOAJNMTA1NjQzODcyODUwNzE1NTU0Njk3NTM5OTA2NjE0MTA4NDAxMTg2MzU5MjU0NjY1OTcwMzcwMTgwNTg3NzAwNDEzNDc1MTg0NjEzNjhNMTI1OTczMjM1NDcyNzc1NzkxNDQ2OTg0OTYzNzIyNDI2MTUzNjgwODU4MDEzMTMzNDMxNTU3MzU1MTEzMzAwMDM4ODQ3Njc5NTc4NTQCATEBMANNMTU3OTE1ODk0NzI1NTY4MjYyNjMyMzE2NDQ3Mjg4NzMzMzc2MjkwMTUyNjk5ODQ2OTk0MDQwNzM2MjM2MDMzNTI1Mzc2Nzg4MTMxNzFMNDU0Nzg2NjQ5OTI0ODg4MTQ0OTY3NjE2MTE1ODAyNDc0ODA2MDQ4NTM3MzI1MDAyOTQyMzkwNDExMzAxNzQyMjUzOTAzNzE2MjUyNwExMXdpYVhOeklqb2lhSFIwY0hNNkx5OXBaQzUwZDJsMFkyZ3VkSFl2YjJGMWRHZ3lJaXcCMmV5SmhiR2NpT2lKU1V6STFOaUlzSW5SNWNDSTZJa3BYVkNJc0ltdHBaQ0k2SWpFaWZRTTIwNzk0Nzg4NTU5NjIwNjY5NTk2MjA2NDU3MDIyOTY2MTc2OTg2Njg4NzI3ODc2MTI4MjIzNjI4MTEzOTE2MzgwOTI3NTAyNzM3OTExCgAAAAAAAABhAPl6x1AzJDGj7MEyBbKiIMd8l+o+yL1NU/9cs8OJIysI4Cy9GbT0GY3NnY1+0PaRaAXTm5EmeiWeHqYjn9OauAa5xu4WMO8+cRFEpkjbBruyKE9ydM++5T/87lA8waSSAA== │ │ bytes │ BWhlbGxv ────────────────────────────────────────────────╯ target/debug/sui keytool zk-login-sig-verify --sig BQNNMTczMTgwODkxMjU5NTI0MjE3MzYzNDIyNjM3MTc5MzI3MTk0Mzc3MTc4NDQyODI0MTAxODc5NTc5ODQ3NTE5Mzk5NDI4OTgyNTEyNTBNMTEzNzM5NjY2NDU0NjkxMjI1ODIwNzQwODIyOTU5ODUzODgyNTg4NDA2ODE2MTgyNjg1OTM5NzY2OTczMjU4OTIyODA5MTU2ODEyMDcBMQMCTDU5Mzk4NzExNDczNDg4MzQ5OTczNjE3MjAxMjIyMzg5ODAxNzcxNTIzMDMyNzQzMTEwNDcyNDk5MDU5NDIzODQ5MTU3Njg2OTA4OTVMNDUzMzU2ODI3MTEzNDc4NTI3ODczMTIzNDU3MDM2MTQ4MjY1MTk5Njc0MDc5MTg4ODI4NTg2NDk2Njg4NDAzMjcxNzA0OTgxMTcwOAJNMTA1NjQzODcyODUwNzE1NTU0Njk3NTM5OTA2NjE0MTA4NDAxMTg2MzU5MjU0NjY1OTcwMzcwMTgwNTg3NzAwNDEzNDc1MTg0NjEzNjhNMTI1OTczMjM1NDcyNzc1NzkxNDQ2OTg0OTYzNzIyNDI2MTUzNjgwODU4MDEzMTMzNDMxNTU3MzU1MTEzMzAwMDM4ODQ3Njc5NTc4NTQCATEBMANNMTU3OTE1ODk0NzI1NTY4MjYyNjMyMzE2NDQ3Mjg4NzMzMzc2MjkwMTUyNjk5ODQ2OTk0MDQwNzM2MjM2MDMzNTI1Mzc2Nzg4MTMxNzFMNDU0Nzg2NjQ5OTI0ODg4MTQ0OTY3NjE2MTE1ODAyNDc0ODA2MDQ4NTM3MzI1MDAyOTQyMzkwNDExMzAxNzQyMjUzOTAzNzE2MjUyNwExMXdpYVhOeklqb2lhSFIwY0hNNkx5OXBaQzUwZDJsMFkyZ3VkSFl2YjJGMWRHZ3lJaXcCMmV5SmhiR2NpT2lKU1V6STFOaUlzSW5SNWNDSTZJa3BYVkNJc0ltdHBaQ0k2SWpFaWZRTTIwNzk0Nzg4NTU5NjIwNjY5NTk2MjA2NDU3MDIyOTY2MTc2OTg2Njg4NzI3ODc2MTI4MjIzNjI4MTEzOTE2MzgwOTI3NTAyNzM3OTExCgAAAAAAAABhAPl6x1AzJDGj7MEyBbKiIMd8l+o+yL1NU/9cs8OJIysI4Cy9GbT0GY3NnY1+0PaRaAXTm5EmeiWeHqYjn9OauAa5xu4WMO8+cRFEpkjbBruyKE9ydM++5T/87lA8waSSAA== --bytes BWhlbGxv --intent-scope 3 --curr-epoch 9 ─────────────────╮ │ data │ {"message":[104,101,108,108,111]} │ │ parsed │ {"inputs":{"proofPoints":{"a":["17318089125952421736342263717932719437717844282410187957984751939942898251250","11373966645469122582074082295985388258840681618268593976697325892280915681207","1"],"b":[["5939871147348834997361720122238980177152303274311047249905942384915768690895","4533568271134785278731234570361482651996740791888285864966884032717049811708"],["10564387285071555469753990661410840118635925466597037018058770041347518461368","12597323547277579144698496372242615368085801313343155735511330003884767957854"],["1","0"]],"c":["15791589472556826263231644728873337629015269984699404073623603352537678813171","4547866499248881449676161158024748060485373250029423904113017422539037162527","1"]},"issBase64Details":{"value":"wiaXNzIjoiaHR0cHM6Ly9pZC50d2l0Y2gudHYvb2F1dGgyIiw","indexMod4":2},"headerBase64":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjEifQ","addressSeed":"20794788559620669596206457022966176986688727876128223628113916380927502737911"},"maxEpoch":10,"userSignature":"APl6x1AzJDGj7MEyBbKiIMd8l+o+yL1NU/9cs8OJIysI4Cy9GbT0GY3NnY1+0PaRaAXTm5EmeiWeHqYjn9OauAa5xu4WMO8+cRFEpkjbBruyKE9ydM++5T/87lA8waSSAA=="} │ │ jwks │ [[{"iss":"https://accounts.google.com","kid":"a06af0b68a2119d692cac4abf415ff3788136f65"},{"kty":"RSA","e":"AQAB","n":"yrIpMnHYrVPwlbC-IY8aU2Q6QKnLf_p1FQXNiTO9mWFdeYXP4cNF6QKWgy4jbVSrOs-4qLZbKwRvZhfTuuKW6fwj5lVZcNsq5dd6GXR65I8kwomMH-Zv_pDt9zLiiJCp5_GU6Klb8zMY_jEE1fZp88HIk2ci4GrmtPTbw8LHAkn0P54sQQqmCtzqAWp8qkZ-GGNITxMIdQMY225kX7Dx91ruCb26jPCvF5uOrHT-I6rFU9fZbIgn4T9PthruubbUCutKIR-JK8B7djf61f8ETuKomaHVbCcxA-Q7xD0DEJzeRMqiPrlb9nJszZjmp_VsChoQQg-wl0jFP-1Rygsx9w","alg":"RS256"}],[{"iss":"https://accounts.google.com","kid":"f5f4bf46e52b31d9b6249f7309ad0338400680cd"},{"kty":"RSA","e":"AQAB","n":"q5hcowR4IuPiSvHbwj9Rv9j2XRnrgbAAFYBqoLBwUV5GVIiNPKnQBYa8ZEIK2naj9gqpo3DU9lx7d7RzeVlzCS5eUA2LV94--KbT0YgIJnApj5-hyDIaevI1Sf2YQr_cntgVLvxqfW1n9ZvbQSitz5Tgh0cplZvuiWMFPu4_mh6B3ShEKIl-qi-h0cZJlRcIf0ZwkfcDOTE8bqEzWUvlCpCH9FK6Mo9YLjw5LroBcHdUbOg3Keu0uW5SCEi-2XBQgCF6xF3kliciwwnv2HhCPyTiX0paM_sT2uKspYock-IQglQ2TExoJqbYZe6CInSHiAA68fkSkJQDnuRZE7XTJQ","alg":"RS256"}],[{"iss":"https://id.twitch.tv/oauth2","kid":"1"},{"kty":"RSA","e":"AQAB","n":"6lq9MQ-q6hcxr7kOUp-tHlHtdcDsVLwVIw13iXUCvuDOeCi0VSuxCCUY6UmMjy53dX00ih2E4Y4UvlrmmurK0eG26b-HMNNAvCGsVXHU3RcRhVoHDaOwHwU72j7bpHn9XbP3Q3jebX6KIfNbei2MiR0Wyb8RZHE-aZhRYO8_-k9G2GycTpvc-2GBsP8VHLUKKfAs2B6sW3q3ymU6M0L-cFXkZ9fHkn9ejs-sqZPhMJxtBPBxoUIUQFTgv4VXTSv914f_YkNw-EjuwbgwXMvpyr06EyfImxHoxsZkFYB-qBYHtaMxTnFsZBr6fn8Ha2JqT1hoP7Z5r5wxDu3GQhKkHw","alg":"RS256"}],[{"iss":"https://www.facebook.com","kid":"7aeca42948d037b8f738453c1e790260bc418570"},{"kty":"RSA","e":"AQAB","n":"0LtxaQsz_3C4CXxBVUPROKHB5iwCWUEtq9_EqHD_G5BtdH7xB0KGFxZWoKEhdA3bPIwvg0gcq6LAiDqHuisNqvUR8cdcHisOTKUg6nDbuic8ZrqKepDoUP8u-yFB-yxm0oaYJZ7-g4R5ai1xHGEwHWNZPDc1hbEqQs-v5b-7jjKTcIWKFDIe71uCyqWv3s-0R4hIv7wRKiGhjbzAbEDodI9ubU4leF9AbgCir7h9H4OGpLZ_3DnktHO35zBupDfazx9qUhY8BKEJ61d27r8NMC0Ed7FBPC2PhGhzyZInN_Xktb1p2UD-Ona70OOzBuTowtzyhOEUQiPoZTlcR-a6Uw","alg":"RS256"}],[{"iss":"https://www.facebook.com","kid":"7f74f4e44b7e37b0861984864a054ea23d271ece"},{"kty":"RSA","e":"AQAB","n":"pttDerCdKTdqXxU-YAtoGpwG49StZ_5-UXYWX2xU3mtD3oEZ7mXVuC3Nv2juGtgMW6AjIaKojXVn8fk4hz2xzgsjCHhGKIStvvJIoIhQCyoGkOg-2Hs9ozJ1OD3iN7vl4jyEgxtNhuFtxXnk5shlLCu5RVETZm5dARJxuTyZNmLXhulhmzdho6mUPwZkdibznNaTnFCEO3tnRSXyBFJqZ987UBIe6wU-38GBhBwgtrDbYPAfnf5GuGuGLNuvg2jzRs-pdkgN2fuy3UCbYoKSCOOaRtr-kzCre3lqKJTKzWwlwgljLd6N653-ayFqlp7uSP1DpvTbpQZ6VWs9HxnFew","alg":"RS256"}],[{"iss":"https://slack.com","kid":"mB2MAyKSn555isd0EbdhKx6nkyAi9xLq8rvCEb_nOyY"},{"kty":"RSA","e":"AQAB","n":"zQqzXfb677bpMKw0idKC5WkVLyqk04PWMsWYJDKqMUUuu_PmzdsvXBfHU7tcZiNoHDuVvGDqjqnkLPEzjXnaZY0DDDHvJKS0JI8fkxIfV1kNy3DkpQMMhgAwnftUiSXgb5clypOmotAEm59gHPYjK9JHBWoHS14NYEYZv9NVy0EkjauyYDSTz589aiKU5lA-cePG93JnqLw8A82kfTlrJ1IIJo2isyBGANr0YzR-d3b_5EvP7ivU7Ph2v5JcEUHeiLSRzIzP3PuyVFrPH659Deh-UAsDFOyJbIcimg9ITnk5_45sb_Xcd_UN6h5I7TGOAFaJN4oi4aaGD4elNi_K1Q","alg":"RS256"}],[{"iss":"https://appleid.apple.com","kid":"YuyXoY"},{"kty":"RSA","e":"AQAB","n":"1JiU4l3YCeT4o0gVmxGTEK1IXR-Ghdg5Bzka12tzmtdCxU00ChH66aV-4HRBjF1t95IsaeHeDFRgmF0lJbTDTqa6_VZo2hc0zTiUAsGLacN6slePvDcR1IMucQGtPP5tGhIbU-HKabsKOFdD4VQ5PCXifjpN9R-1qOR571BxCAl4u1kUUIePAAJcBcqGRFSI_I1j_jbN3gflK_8ZNmgnPrXA0kZXzj1I7ZHgekGbZoxmDrzYm2zmja1MsE5A_JX7itBYnlR41LOtvLRCNtw7K3EFlbfB6hkPL-Swk5XNGbWZdTROmaTNzJhV-lWT0gGm6V1qWAK2qOZoIDa_3Ud0Gw","alg":"RS256"}],[{"iss":"https://appleid.apple.com","kid":"W6WcOKB"},{"kty":"RSA","e":"AQAB","n":"2Zc5d0-zkZ5AKmtYTvxHc3vRc41YfbklflxG9SWsg5qXUxvfgpktGAcxXLFAd9Uglzow9ezvmTGce5d3DhAYKwHAEPT9hbaMDj7DfmEwuNO8UahfnBkBXsCoUaL3QITF5_DAPsZroTqs7tkQQZ7qPkQXCSu2aosgOJmaoKQgwcOdjD0D49ne2B_dkxBcNCcJT9pTSWJ8NfGycjWAQsvC8CGstH8oKwhC5raDcc2IGXMOQC7Qr75d6J5Q24CePHj_JD7zjbwYy9KNH8wyr829eO_G4OEUW50FAN6HKtvjhJIguMl_1BLZ93z2KJyxExiNTZBUBQbbgCNBfzTv7JrxMw","alg":"RS256"}],[{"iss":"https://kauth.kakao.com","kid":"3f96980381e451efad0d2ddd30e3d3"},{"kty":"RSA","e":"AQAB","n":"q8zZ0b_MNaLd6Ny8wd4cjFomilLfFIZcmhNSc1ttx_oQdJJZt5CDHB8WWwPGBUDUyY8AmfglS9Y1qA0_fxxs-ZUWdt45jSbUxghKNYgEwSutfM5sROh3srm5TiLW4YfOvKytGW1r9TQEdLe98ork8-rNRYPybRI3SKoqpci1m1QOcvUg4xEYRvbZIWku24DNMSeheytKUz6Ni4kKOVkzfGN11rUj1IrlRR-LNA9V9ZYmeoywy3k066rD5TaZHor5bM5gIzt1B4FmUuFITpXKGQZS5Hn_Ck8Bgc8kLWGAU8TzmOzLeROosqKE0eZJ4ESLMImTb2XSEZuN1wFyL0VtJw","alg":"RS256"}],[{"iss":"https://kauth.kakao.com","kid":"9f252dadd5f233f93d2fa528d12fea"},{"kty":"RSA","e":"AQAB","n":"qGWf6RVzV2pM8YqJ6by5exoixIlTvdXDfYj2v7E6xkoYmesAjp_1IYL7rzhpUYqIkWX0P4wOwAsg-Ud8PcMHggfwUNPOcqgSk1hAIHr63zSlG8xatQb17q9LrWny2HWkUVEU30PxxHsLcuzmfhbRx8kOrNfJEirIuqSyWF_OBHeEgBgYjydd_c8vPo7IiH-pijZn4ZouPsEg7wtdIX3-0ZcXXDbFkaDaqClfqmVCLNBhg3DKYDQOoyWXrpFKUXUFuk2FTCqWaQJ0GniO4p_ppkYIf4zhlwUYfXZEhm8cBo6H2EgukntDbTgnoha8kNunTPekxWTDhE5wGAt6YpT4Yw","alg":"RS256"}]] │ │ res │ ╭────┬──╮ │ │ │ │ Ok │ │ │ │ │ ╰────┴──╯ │ ╰────────┴─────────────────────────────────────────────── ``` --- If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process. ### Type of Change (Check all that apply) - [ ] protocol change - [ ] user-visible impact - [ ] breaking change for a client SDKs - [ ] breaking change for FNs (FN binary must upgrade) - [ ] breaking change for validators or node operators (must upgrade binaries) - [ ] breaking change for on-chain data layout - [ ] necessitate either a data wipe or data migration ### Release notes
- Loading branch information