mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-08 17:15:16 -04:00
Added core code for pgphash calculations.
- Reworked GxsIdGroup members... moved IdType -> groupFlags, so Hash & Sign are only ones. - Reworked GroupServiceString storage. - Added core processing functions - yet to test! git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5777 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e803b2c447
commit
17e42f1ceb
5 changed files with 736 additions and 203 deletions
|
@ -37,6 +37,12 @@
|
|||
class RsIdentity;
|
||||
extern RsIdentity *rsIdentity;
|
||||
|
||||
|
||||
// GroupFlags: Only one so far:
|
||||
#define RSGXSID_GROUPFLAG_REALID 0x0001
|
||||
|
||||
|
||||
// THESE ARE FLAGS FOR INTERFACE.
|
||||
#define RSID_TYPE_MASK 0xff00
|
||||
#define RSID_RELATION_MASK 0x00ff
|
||||
|
||||
|
@ -61,8 +67,7 @@ class RsGxsIdGroup
|
|||
// In GroupMetaData.
|
||||
//std::string mNickname; (mGroupName)
|
||||
//std::string mKeyId; (mGroupId)
|
||||
|
||||
uint32_t mIdType;
|
||||
//uint32_t mIdType; (mGroupFlags)
|
||||
|
||||
// SHA(KeyId + Gpg Fingerprint) -> can only be IDed if GPG known.
|
||||
// The length of the input must be long enough to make brute force search implausible.
|
||||
|
@ -70,14 +75,11 @@ class RsGxsIdGroup
|
|||
// Easy to do 1e9 SHA-1 hash computations per second on a GPU.
|
||||
// We will need a minimum of 256 bits, ideally 1024 bits or 2048 bits.
|
||||
|
||||
std::string mGpgIdHash;
|
||||
// Actually PgpIdHash is SHA1(.mMeta.mGroupId + PGPHandler->GpgFingerprint(ownId))
|
||||
// ??? 160 bits.
|
||||
|
||||
// NOTE: These cannot be transmitted as part of underlying messages....
|
||||
// Must use ServiceString.
|
||||
bool mGpgIdKnown; // if GpgIdHash has been identified.
|
||||
std::string mGpgId; // if known.
|
||||
std::string mGpgName; // if known.
|
||||
std::string mGpgEmail; // if known.
|
||||
std::string mPgpIdHash;
|
||||
std::string mPgpIdSign; // Need a signature as proof - otherwise anyone could add others Hashes.
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue