Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tahoe-CHK
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
PrivateStorage
Tahoe-CHK
Commits
f7d92706
Commit
f7d92706
authored
Jul 22, 2022
by
Update Bot
Browse files
Options
Downloads
Patches
Plain Diff
Trivially simplify ShareBlock handling by using 1-indexed counting
parent
17221714
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/CHK.hs
+3
-3
3 additions, 3 deletions
src/CHK.hs
with
3 additions
and
3 deletions
src/CHK.hs
+
3
−
3
View file @
f7d92706
...
...
@@ -335,11 +335,11 @@ chkEncode version stateRef p@(Parameters segmentSize total happy required) dataS
setStage
URIExtensionOffset
same_blocks
.
toStrictByteString
.
intBE
$
startOfData
+
shareSize
+
3
*
segmentHashSize
URIExtensionOffset
->
do
setStage
(
ShareBlock
0
)
setStage
(
ShareBlock
1
)
same_blocks
.
toStrictByteString
.
intBE
$
startOfData
+
shareSize
+
3
*
segmentHashSize
+
shareHashTreeSize
ShareBlock
segmentNumber
->
do
setStage
$
if
segmentNumber
+
1
==
numSegments
if
segmentNumber
==
numSegments
-- After reading this segment, we will have reached the expected (and
-- published) share size. Proceed.
then
PlaintextHashTree
...
...
@@ -348,7 +348,7 @@ chkEncode version stateRef p@(Parameters segmentSize total happy required) dataS
else
ShareBlock
(
segmentNumber
+
1
)
let
paddedCiphertext
crypttext
=
if
segmentNumber
+
1
==
numSegments
if
segmentNumber
==
numSegments
-- Allow the last ciphertext segment to be short. Pad it with
-- nulls if necessary.
then
padTailSegment
crypttext
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment