<s>
Venti	B-Application
is	O
a	O
network	O
storage	O
system	O
that	O
permanently	O
stores	O
data	O
blocks	O
.	O
</s>
<s>
A	O
160-bit	O
SHA-1	B-Algorithm
hash	I-Algorithm
of	O
the	O
data	O
(	O
called	O
score	O
by	O
Venti	B-Application
)	O
acts	O
as	O
the	O
address	O
of	O
the	O
data	O
.	O
</s>
<s>
Venti	B-Application
is	O
typically	O
used	O
with	O
Fossil	B-Application
to	O
provide	O
a	O
file	O
system	O
with	O
permanent	O
snapshots	O
.	O
</s>
<s>
Venti	B-Application
was	O
designed	O
and	O
implemented	O
by	O
Sean	O
Quinlan	O
and	O
Sean	O
Dorward	O
at	O
Bell	O
Labs	O
.	O
</s>
<s>
It	O
appeared	O
in	O
the	O
Plan	B-Operating_System
9	I-Operating_System
distribution	O
in	O
2002	O
.	O
</s>
<s>
Development	O
has	O
been	O
continued	O
by	O
Russ	O
Cox	O
who	O
has	O
reimplemented	O
most	O
of	O
the	O
server	O
,	O
written	O
a	O
library	O
for	O
creating	O
datastructures	O
(	O
files	O
,	O
directories	O
and	O
meta-data	O
)	O
to	O
store	O
in	O
Venti	B-Application
and	O
implemented	O
optimizations	O
.	O
</s>
<s>
Venti	B-Application
is	O
available	O
both	O
in	O
the	O
Plan	B-Operating_System
9	I-Operating_System
distribution	O
and	O
for	O
many	O
UNIX-like	O
operating	O
systems	O
as	O
part	O
of	O
Plan	B-Application
9	I-Application
from	I-Application
User	I-Application
Space	I-Application
.	O
</s>
<s>
Venti	B-Application
is	O
included	O
as	O
part	O
of	O
Inferno	B-Operating_System
with	O
accompanying	O
modules	O
for	O
access	O
.	O
</s>
<s>
There	O
is	O
a	O
Go	B-Application
set	O
of	O
programs	O
to	O
build	O
your	O
own	O
Venti	B-Application
servers	O
.	O
</s>
<s>
Venti	B-Application
is	O
a	O
user	B-Operating_System
space	I-Operating_System
daemon	B-Operating_System
.	O
</s>
<s>
Clients	O
connect	O
to	O
Venti	B-Application
over	O
TCP	B-Protocol
and	O
communicate	O
using	O
a	O
simple	O
RPC-protocol	O
.	O
</s>
<s>
write(data, type )	O
,	O
stores	O
data	O
at	O
the	O
address	O
calculated	O
by	O
SHA-1	B-Algorithm
hashing	O
data	O
,	O
combined	O
with	O
type	O
.	O
</s>
<s>
The	O
data	O
block	O
stored	O
by	O
Venti	B-Application
must	O
be	O
greater	O
than	O
512	O
bytes	O
in	O
length	O
and	O
smaller	O
than	O
56	O
kilobytes	O
.	O
</s>
<s>
So	O
,	O
if	O
a	O
Venti	B-Application
user/client	O
wants	O
to	O
store	O
larger	O
data	O
blocks	O
,	O
it	O
has	O
to	O
make	O
a	O
datastructure	O
(	O
which	O
can	O
be	O
stored	O
in	O
Venti	B-Application
)	O
.	O
</s>
<s>
For	O
example	O
,	O
Fossil	B-Application
uses	O
hash	B-Application
trees	I-Application
to	O
store	O
large	O
files	O
.	O
</s>
<s>
Venti	B-Application
itself	O
is	O
not	O
concerned	O
with	O
the	O
contents	O
of	O
a	O
data	O
block	O
;	O
it	O
does	O
however	O
store	O
the	O
type	O
of	O
a	O
data	O
block	O
.	O
</s>
<s>
The	O
design	O
of	O
Venti	B-Application
has	O
the	O
following	O
consequences	O
:	O
</s>
<s>
Since	O
writes	O
are	O
permanent	O
,	O
the	O
file	O
system	O
is	O
append-only	O
(	O
which	O
allows	O
for	O
a	O
simple	O
implementation	O
with	O
lower	O
chance	O
of	O
data-destroying	O
bugs	O
)	O
;	O
no	O
file	O
system	O
fragmentation	B-Architecture
occurs	O
.	O
</s>
<s>
Since	O
SHA-1	B-Algorithm
is	O
a	O
cryptographically	O
secure	O
hash	O
,	O
it	O
is	O
computationally	O
infeasible	O
to	O
fabricate	O
data	O
.	O
</s>
<s>
Data	O
can	O
be	O
compressed	O
without	O
making	O
the	O
disk	B-Device
structure	I-Device
complicated	O
.	O
</s>
<s>
The	O
data	O
blocks	O
are	O
stored	O
on	O
hard	B-Device
drives	I-Device
.	O
</s>
<s>
Another	O
set	O
of	O
hard	B-Device
drives	I-Device
is	O
used	O
for	O
the	O
index	O
,	O
which	O
maps	O
scores	O
to	O
addresses	O
in	O
the	O
data	O
log	O
.	O
</s>
<s>
The	O
data	O
structure	O
used	O
for	O
the	O
index	O
is	O
a	O
hash	B-Algorithm
table	I-Algorithm
with	O
fixed-sized	O
buckets	O
.	O
</s>
<s>
Venti	B-Application
relies	O
on	O
the	O
scores	O
to	O
be	O
randomly	O
distributed	O
so	O
buckets	O
do	O
not	O
fill	O
up	O
.	O
</s>
<s>
Since	O
each	O
lookup	O
costs	O
one	O
disk	O
seek	O
time	O
,	O
an	O
index	O
usually	O
consists	O
of	O
multiple	O
hard	B-Device
drives	I-Device
with	O
low	O
access	B-General_Concept
time	I-General_Concept
.	O
</s>
<s>
The	O
Venti	B-Application
server	O
may	O
be	O
used	O
by	O
clients	O
in	O
several	O
ways	O
.	O
</s>
<s>
The	O
Plan	B-Operating_System
9	I-Operating_System
operating	O
system	O
makes	O
use	O
of	O
Venti	B-Application
for	O
daily	O
archival	O
snapshots	O
of	O
the	O
file	O
system	O
.	O
</s>
<s>
The	O
utility	O
programs	O
'	O
vac	O
 '	O
and	O
'	O
unvac	O
 '	O
can	O
be	O
used	O
to	O
store	O
and	O
retrieve	O
data	O
from	O
a	O
Venti	B-Application
server	O
in	O
the	O
form	O
of	O
individual	O
files	O
or	O
as	O
a	O
directory	O
and	O
its	O
contents	O
.	O
</s>
<s>
Data	O
and	O
index	O
scores	O
can	O
be	O
duplicated	O
between	O
Venti	B-Application
servers	O
using	O
'	O
rdarena	O
 '	O
and	O
'	O
wrarena	O
 '	O
.	O
</s>
<s>
Plan	B-Operating_System
9	I-Operating_System
from	I-Operating_System
Bell	I-Operating_System
Labs	I-Operating_System
,	O
Plan	B-Application
9	I-Application
from	I-Application
User	I-Application
Space	I-Application
,	O
Inferno	B-Operating_System
and	O
any	O
other	O
clients	O
that	O
implement	O
the	O
Venti	B-Application
protocol	O
can	O
all	O
be	O
used	O
interchangeably	O
to	O
store	O
and	O
retrieve	O
data	O
.	O
</s>
<s>
In	O
the	O
case	O
of	O
Venti	B-Application
,	O
the	O
set	O
of	O
possible	O
SHA-1	B-Algorithm
hashes	I-Algorithm
is	O
obviously	O
smaller	O
than	O
the	O
set	O
of	O
all	O
possible	O
blocks	O
that	O
could	O
be	O
stored	O
in	O
the	O
filesystem	O
,	O
and	O
thus	O
a	O
hash	B-Algorithm
collision	I-Algorithm
is	O
possible	O
.	O
</s>
<s>
The	O
risk	O
of	O
accidental	O
hash	B-Algorithm
collision	I-Algorithm
in	O
a	O
160-bit	O
hash	O
is	O
very	O
small	O
,	O
even	O
for	O
exabytes	O
of	O
data	O
.	O
</s>
<s>
Historically	O
,	O
however	O
,	O
many	O
hash	O
functions	O
become	O
increasingly	O
vulnerable	O
to	O
malicious	O
hash	B-Algorithm
collisions	I-Algorithm
due	O
to	O
both	O
cryptographic	O
and	O
computational	O
advances	O
.	O
</s>
<s>
Venti	B-Application
does	O
not	O
address	O
the	O
issue	O
of	O
hash	B-Algorithm
collisions	I-Algorithm
;	O
as	O
of	O
this	O
time	O
,	O
it	O
is	O
still	O
computationally	O
infeasible	O
to	O
find	O
collisions	O
in	O
SHA-1	B-Algorithm
,	O
but	O
it	O
may	O
become	O
necessary	O
for	O
Venti	B-Application
to	O
switch	O
to	O
a	O
different	O
hash	O
function	O
at	O
some	O
point	O
in	O
the	O
future	O
.	O
</s>
<s>
On	O
23	O
February	O
2017	O
,	O
Google	O
announced	O
the	O
SHAttered	O
attack	O
,	O
in	O
which	O
they	O
generated	O
two	O
different	O
PDF	O
files	O
with	O
the	O
same	O
SHA-1	B-Algorithm
hash	I-Algorithm
in	O
roughly	O
263.1	O
SHA-1	B-Algorithm
evaluations	O
.	O
</s>
