diff options
| author | MITSUNARI Shigeo <herumi@nifty.com> | 2018-05-06 13:34:16 +0800 |
|---|---|---|
| committer | MITSUNARI Shigeo <herumi@nifty.com> | 2018-05-06 13:34:16 +0800 |
| commit | d88041eb84246d7733877bec5b351a838d4f89ba (patch) | |
| tree | bf9280586b3c58ba203e7857f6b8d24cec7c03d3 /include/mcl | |
| parent | 664beecda1351bdeed7d2abf6f529f890248eb0c (diff) | |
| download | tangerine-mcl-d88041eb84246d7733877bec5b351a838d4f89ba.tar.gz tangerine-mcl-d88041eb84246d7733877bec5b351a838d4f89ba.tar.zst tangerine-mcl-d88041eb84246d7733877bec5b351a838d4f89ba.zip | |
update doc for IoSerialize
Diffstat (limited to 'include/mcl')
| -rw-r--r-- | include/mcl/op.hpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/include/mcl/op.hpp b/include/mcl/op.hpp index 874b99f..2cf6838 100644 --- a/include/mcl/op.hpp +++ b/include/mcl/op.hpp @@ -76,11 +76,18 @@ namespace mcl { "2 <x>" ; compressed for even y "3 <x>" ; compressed for odd y - IoSerialize(fixed size = Fp::getByteSize()) - use MSB of array of x for 1-bit y for prime p where (p % 8 != 0) - [0] ; infinity - <x> ; for even y - <x>|1 ; for odd y ; |1 means set MSB of x + IoSerialize + if isMSBserialize(): // p is not full bit + size = Fp::getByteSize() + use MSB of array of x for 1-bit y for prime p where (p % 8 != 0) + [0] ; infinity + <x> ; for even y + <x>|1 ; for odd y ; |1 means set MSB of x + else: + size = Fp::getByteSize() + 1 + [0] ; infinity + 2 <x> ; for even y + 3 <x> ; for odd y */ enum IoMode { IoAuto = 0, // dec or hex according to ios_base::fmtflags |
