git-annex/Types
Joey Hess bd5affa362
use hmac in balanced preferred content
This deals with the possible security problem that someone could make an
unusually low UUID and generate keys that are all constructed to hash to
a number that, mod the number of repositories in the group, == 0.
So balanced preferred content would always put those keys in the
repository with the low UUID as long as the group contains the
number of repositories that the attacker anticipated.
Presumably the attacker than holds the data for ransom? Dunno.

Anyway, the partial solution is to use HMAC (sha256) with all the UUIDs
combined together as the "secret", and the key as the "message". Now any
change in the set of UUIDs in a group will invalidate the attacker's
constructed keys from hashing to anything in particular.

Given that there are plenty of other things someone can do if they can
write to the repository -- including modifying preferred content so only
their repository wants files, and numcopies so other repositories drom
them -- this seems like safeguard enough.

Note that, in balancedPicker, combineduuids is memoized.
2024-08-10 16:32:54 -04:00
..
ActionItem.hs --explain for preferred/required content matching 2023-07-26 14:50:04 -04:00
AdjustedBranch.hs
Availability.hs let Remote.availability return Unavilable 2023-08-16 14:31:31 -04:00
Backend.hs implement URL to VURL migration 2024-03-01 16:42:02 -04:00
Benchmark.hs
BranchState.hs clean up git-remote-annex git-annex branch handling 2024-05-15 17:33:38 -04:00
CatFileHandles.hs
CleanupActions.hs
Cluster.hs remove dead nodes when loading the cluster log 2024-06-16 14:39:44 -04:00
Command.hs git-annex-shell: accept uuid of remote that proxying is enabled for 2024-06-10 12:44:35 -04:00
Concurrency.hs
Creds.hs
Crypto.hs support annex.shared-sop-command for encryption=shared 2024-01-12 13:31:18 -04:00
DeferredParse.hs
DesktopNotify.hs
Difference.hs git-remote-annex support exporttree=yes remotes 2024-05-13 11:48:00 -04:00
Direction.hs
Distribution.hs
Export.hs proxy stores received keys to known export locations 2024-08-07 09:47:34 -04:00
FileMatcher.hs --explain for preferred/required content matching 2023-07-26 14:50:04 -04:00
GitConfig.hs Remove debug output (to stderr) 2024-08-02 14:13:29 -04:00
GitRemoteAnnex.hs avoid duplicates building up in outManifest 2024-05-24 15:10:56 -04:00
Group.hs use hmac in balanced preferred content 2024-08-10 16:32:54 -04:00
Import.hs implement importChanges optimisaton (not used yet) 2023-05-31 16:01:34 -04:00
IndexFiles.hs
Key.hs git-annex unused --from remote skips its git-remote-annex keys 2024-05-14 15:17:40 -04:00
KeySource.hs
Link.hs
LockCache.hs
Messages.hs rename errorid to message-id 2023-04-26 12:53:30 -04:00
MetaData.hs simplify base64 to only use ByteString 2023-10-26 13:10:05 -04:00
Mime.hs
NumCopies.hs toward SafeDropProof expiry checking 2024-07-04 12:39:06 -04:00
ProposedAccepted.hs
RefSpec.hs
Remote.hs proxied exporttree=yes versionedexport=yes remotes are not untrusted 2024-08-08 15:24:19 -04:00
RemoteConfig.hs git-remote-annex: Display full url when using remote with the shorthand url 2024-05-24 17:15:31 -04:00
RemoteState.hs
RepoVersion.hs
ScheduledActivity.hs
StallDetection.hs run codespell throughout fixing typos automagically 2024-05-01 15:46:21 -04:00
StandardGroups.hs
StoreRetrieve.hs toward SafeDropProof expiry checking 2024-07-04 12:39:06 -04:00
Test.hs
Transfer.hs P2P protocol version 2, adding SUCCESS-PLUS and ALREADY-HAVE-PLUS 2024-06-18 16:21:40 -04:00
Transferrer.hs
TransferrerPool.hs
Transitions.hs
TrustLevel.hs
Upgrade.hs
UrlContents.hs
UUID.hs dummy HasClient ClientM WebSocket 2024-07-07 21:21:45 -04:00
VectorClock.hs
View.hs
WorkerPool.hs