Cryptography Reference
In-Depth Information
> G := GroupGen(128);
[7143960370527828449526186688517633375999686217377009296423868708801759874817710\
44516230251678357194577874211745344114799304637844601838348544484390830624759486\
95932360634468813637697596737239838069690519627994216763581439493288047386036509\
312997318183492446635794618510999578298071550679632722709422498635719,
56600621692894720322996831833949279484205491510729070417562352113259285392750814\
45241064072872020057929853316293678394394369121243919939352924928342168393609742\
60392124327867520493214776038256728212989970935152898882722244842081959733688072\
96848016347016770933697531239418456740770508272810070053458729355158,
12834761662158188686247780916551983750441253380555481842123880828402799347346786\
48896869300523477729603613823050704935679367796973569651545691929351791926092029\
19328497565609358744443270379161709125820576315696572501643846814011418047708796\
283951920847132685414859904080942551667004379215432777630971105695820]
Now, to generate the public key/private key pair, we invoke CSKeyGen .Ifwe
only use as input a random seed, then the group and its generators will be freshly
generated by the function but, since we want to use the previous group G , we will pass
it as one of the inputs of the function. We use default values for the remaining input
parameters so that, in particular, the key components will be given as hexadecimal
strings.
> key := CSKeyGen("33303080cef2f5c15da1c00c87758683", 'G' = G);
pk := key[1]:
sk := key[2]:
Note that the value of the keys is entirely determined by the seed string and the
group G . We print only the public key; observe also that the first three elements in
it are the same as those in the list G , except that now they are given as hexadecimal
strings:
> pk;
["65bbbe4e4baff6e59d553e248230d2da1536308b2f46817b86610c8f97bdd10d0cf0a81301e3f1\
c05445fa13260175c9f5c4272639e99ac6ed92ee4be1fd282daec872bbb2e29f9dec37bbb52cfa55\
3cf17a0afed9b8f8425110eaae8d2960ec116aff17733a98473352d4a988511dd173d910b3ced6f0\
30274e90d97b1bdfc7", "509a1a19df591c04e10073d2ca3e65be4a1ee85eb78828ec08d4e1593e\
91113b0b8210a7802e302ff900beb4f5e84fb44c6a92493b688e2064d5b4b8f8329a68daa48b015b\
2d78a375c3ab5aaa4ea29a08efc46031ee8995e2aeabcca761a1b439d1ff75420ccc9491f7864f6d\
4191384631ddca91221b69cf31df3a5b41c796", "b6c5e81c88209d1805475d8bf0169ecb3dae3b\
ab01316bb84d337f3f961817016621b24096a0aeeb3a600da9efe8dd8f45ef54b0a7668c5bf5d2f9\
a8378985e8bc12c60ca87dcc03b9f7715f9fd11154c5cd48f4e4a7606c92f0a7a55ea95015bad63f\
499becc3948490840fd62692bc984759065ae1ca22360e8113b338d84c", "a0824a1a266a8ff26e\
9d65d30f54c9414b0750330ff764f4a599c4cdf713100a1ba10ad782a32bddc755813f0d24e00ee1\
a682a3f0ab9abfcc6d347c97db7357c78ba8fbe99b06fa7595d8560e9dd5106ed34252f927a07967\
e664404e53661669db5a16d9b0ecdf2882d7964d9e3d3b87eb80212956804e6ab0433d3724ef74",
"4f523e323ac311f60f69589f0544a06d8e6a14c3f4762ffac4651c98594d84b0b4393d70c09ae3a\
d447f3c599b47500367f160e7e06ae42c4e6d93571bddc567f726bddd9982266037e51ddcb6ae956\
5da36c2f19875ba557e2e7456b6ecee87650e280cd72817fcc4beaeb3c5749646f75e52a771ac87d\
4c45542ca40cc6acb", "9ca603dfc4ac264674a10af8678e07616607eda45bf462ec5372f4aca5e\
ca841b328c99a46367e98def6ff2eb60d22bb11cff4d540cb520ea4bd06ab92c416b0c9327b26bdf\
9316c0728a6f3c85feadf8f93fdffdfc517dc75c0fb2a7b42e0084b4fffcdc38cba3dc5156a3b944\
6f0dbde3430454e343b279c5199abcf22814d"]
Exercise 8.29 Write a Maple function that tests whether a Cramer-Shoup key in
the format output by CSKeyGen is valid. The function should accept as input either
a public key pk or a public key/private key pair (given as a list
[
,
]
). Apart from
checking that keys are given in the expected format the function should check, in case
a public key is tested, that the first element in the list is a Sophie Germain prime q and
that the remaining elements are all quadratic residues in
pk
sk
Z p , where p
1. If
the private key is also given then the function should check that the public and private
=
2 q
+
Search WWH ::




Custom Search