diff options
author | lloyd <[email protected]> | 2010-06-17 21:48:55 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-06-17 21:48:55 +0000 |
commit | c06b260b3328c5ce4be44c4f1a88feb55ee3dbc4 (patch) | |
tree | 41b05df5982b5b2e8a23b55972263d2172d6a9fd /src/constructs/tss | |
parent | 0eecae9f21172c0a74ad62acaf77148c94a25be7 (diff) | |
parent | 3dde5683f69b9cb9f558bfb18087ce35fbbec78a (diff) |
propagate from branch 'net.randombit.botan' (head 294e2082ce9231d6165276e2f2a4153a0116aca3)
to branch 'net.randombit.botan.c++0x' (head 0b695fad10f924601e07b009fcd781191fafcb28)
Diffstat (limited to 'src/constructs/tss')
-rw-r--r-- | src/constructs/tss/tss.h | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/src/constructs/tss/tss.h b/src/constructs/tss/tss.h index c8b0242d8..485e42c53 100644 --- a/src/constructs/tss/tss.h +++ b/src/constructs/tss/tss.h @@ -15,16 +15,19 @@ namespace Botan { +/** +* A split secret, using the format from draft-mcgrew-tss-03 +*/ class BOTAN_DLL RTSS_Share { public: /** - * @arg M the number of shares needed to reconstruct - * @arg N the number of shares generated - * @arg secret the secret to split - * @arg secret_len the length of the secret - * @arg identifier the 16 byte share identifier - * @arg rng the random number generator to use + * @param M the number of shares needed to reconstruct + * @param N the number of shares generated + * @param secret the secret to split + * @param secret_len the length of the secret + * @param identifier the 16 byte share identifier + * @param rng the random number generator to use */ static std::vector<RTSS_Share> split(byte M, byte N, @@ -33,18 +36,36 @@ class BOTAN_DLL RTSS_Share RandomNumberGenerator& rng); /** - * @arg shares the list of shares + * @param shares the list of shares */ static SecureVector<byte> reconstruct(const std::vector<RTSS_Share>& shares); RTSS_Share() {} - RTSS_Share(const std::string&); + /** + * @param hex_input the share encoded in hexadecimal + */ + RTSS_Share(const std::string& hex_input); + + /** + * @return hex representation + */ std::string to_string() const; + + /** + * @return share identifier + */ byte share_id() const; + /** + * @return size of this share in bytes + */ u32bit size() const { return contents.size(); } + + /** + * @return if this TSS share was initialized or not + */ bool initialized() const { return (contents.size() > 0); } private: SecureVector<byte> contents; |