diff --git a/sheet02/a2/b-privatekey.txt b/sheet02/a2/b-privatekey.txt new file mode 100644 index 0000000..d5ca775 --- /dev/null +++ b/sheet02/a2/b-privatekey.txt @@ -0,0 +1 @@ +ME4CAQAwEAYHKoZIzj0CAQYFK4EEACIENzA1AgEBBDA/BgxBUzJUc3MfZVBIdPTbQfIdf4SABYZJlno8rUPkhBRrK3VkpEhyGdviYUPViz4= \ No newline at end of file diff --git a/sheet02/a2/b-publickey.txt b/sheet02/a2/b-publickey.txt new file mode 100644 index 0000000..069de09 --- /dev/null +++ b/sheet02/a2/b-publickey.txt @@ -0,0 +1 @@ +MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEVHteuMnscItIHycwEZ80P44WyIWmL7PmeN6HLRAu8IJsLKX6BTDawN0MezskF68oQ9Ft7zy2u4v2aaYB4tgUv+0YG7zEwFr0ofqSqFFPSLr0qrVRvXi/H7Bux8tYVgaN \ No newline at end of file diff --git a/sheet02/a2/b-signature.txt b/sheet02/a2/b-signature.txt new file mode 100644 index 0000000..7a7c4f7 --- /dev/null +++ b/sheet02/a2/b-signature.txt @@ -0,0 +1 @@ +MGQCMHq04CPgDiSaWPXb3LiuBrb97aV4JjinA5gIuEIFjFYLD1jYdECBdV/aHLLYsyMYnAIwedsP6qJKK4Y2uLgn3XLxbHgDKxf+eq07Rptmn/LttHTpWjtTfaLERM+Uh2BUGmMt \ No newline at end of file diff --git a/sheet02/a2/c.txt b/sheet02/a2/c.txt index e69de29..47301f6 100644 --- a/sheet02/a2/c.txt +++ b/sheet02/a2/c.txt @@ -0,0 +1,5 @@ +copy the publickey into a .pem file that starts with -----BEGIN PUBLIC KEY----- and ends with -----END PUBLIC KEY----- and has linebreaks after 64 chars. +then decode the base64 signature +base64 -d b-signature.txt > signature.bin +verify using openssl +openssl dgst -sha256 -verify c-pubkey.pem -signature signature.bin plaintext.txt \ No newline at end of file