<s>
Keychain	B-Application
is	O
the	O
password	O
management	O
system	O
in	O
macOS	B-Application
,	O
developed	O
by	O
Apple	O
.	O
</s>
<s>
It	O
was	O
introduced	O
with	O
Mac	B-Operating_System
OS	I-Operating_System
8.6	I-Operating_System
,	O
and	O
has	O
been	O
included	O
in	O
all	O
subsequent	O
versions	O
of	O
the	O
operating	O
system	O
,	O
now	O
known	O
as	O
macOS	B-Application
.	O
</s>
<s>
A	O
Keychain	B-Application
can	O
contain	O
various	O
types	O
of	O
data	O
:	O
passwords	O
(	O
for	O
websites	O
,	O
FTP	B-Protocol
servers	I-Protocol
,	O
SSH	B-Protocol
accounts	O
,	O
network	B-General_Concept
shares	I-General_Concept
,	O
wireless	B-General_Concept
networks	I-General_Concept
,	O
groupware	B-Application
applications	I-Application
,	O
encrypted	O
disk	B-Application
images	I-Application
)	O
,	O
private	B-Application
keys	I-Application
,	O
certificates	O
,	O
and	O
secure	O
notes	O
.	O
</s>
<s>
In	O
macOS	B-Application
,	O
keychain	B-Application
files	O
are	O
stored	O
in	O
~	O
/Library/Keychains/	O
(	O
and	O
subdirectories	O
)	O
,	O
/Library/Keychains/	O
,	O
and	O
/Network/Library/Keychains/	O
,	O
and	O
the	O
Keychain	B-Application
Access	O
GUI	O
application	O
is	O
located	O
in	O
the	O
Utilities	O
folder	O
in	O
the	O
Applications	O
folder	O
.	O
</s>
<s>
It	O
is	O
free	B-Application
,	O
open	B-Application
source	I-Application
software	I-Application
released	O
under	O
the	O
terms	O
of	O
the	O
APSL-2.0	B-License
.	O
</s>
<s>
The	O
command	O
line	O
equivalent	O
of	O
Keychain	B-Application
Access	O
is	O
/usr/bin/security	O
.	O
</s>
<s>
The	O
keychain	B-Application
database	O
is	O
encrypted	O
per-table	O
and	O
per-row	O
with	O
AES-256-GCM	B-Algorithm
.	O
</s>
<s>
The	O
default	O
keychain	B-Application
file	O
is	O
the	O
login	O
keychain	B-Application
,	O
typically	O
unlocked	O
on	O
login	O
by	O
the	O
user	O
's	O
login	O
password	O
,	O
although	O
the	O
password	O
for	O
this	O
keychain	B-Application
can	O
instead	O
be	O
different	O
from	O
a	O
user	O
's	O
login	O
password	O
,	O
adding	O
security	O
at	O
the	O
expense	O
of	O
some	O
convenience	O
.	O
</s>
<s>
The	O
Keychain	B-Application
Access	O
application	O
does	O
not	O
permit	O
setting	O
an	O
empty	O
password	O
on	O
a	O
keychain	B-Application
.	O
</s>
<s>
The	O
keychain	B-Application
may	O
be	O
set	O
to	O
be	O
automatically	O
"	O
locked	O
"	O
if	O
the	O
computer	O
has	O
been	O
idle	O
for	O
a	O
time	O
,	O
and	O
can	O
be	O
locked	O
manually	O
from	O
the	O
Keychain	B-Application
Access	O
application	O
.	O
</s>
<s>
When	O
locked	O
,	O
the	O
password	O
has	O
to	O
be	O
re-entered	O
next	O
time	O
the	O
keychain	B-Application
is	O
accessed	O
,	O
to	O
unlock	O
it	O
.	O
</s>
<s>
Overwriting	O
the	O
file	O
in	O
~	O
/Library/Keychains/	O
with	O
a	O
new	O
one	O
(	O
e.g.	O
</s>
<s>
as	O
part	O
of	O
a	O
restore	O
operation	O
)	O
also	O
causes	O
the	O
keychain	B-Application
to	O
lock	O
and	O
a	O
password	O
is	O
required	O
at	O
next	O
access	O
.	O
</s>
<s>
If	O
the	O
login	O
keychain	B-Application
is	O
protected	O
by	O
the	O
login	O
password	O
,	O
then	O
the	O
keychain	B-Application
's	O
password	O
will	O
be	O
changed	O
whenever	O
the	O
login	O
password	O
is	O
changed	O
from	O
within	O
a	O
logged-in	O
session	O
on	O
macOS	B-Application
.	O
</s>
<s>
On	O
a	O
shared	O
Mac/non	O
-Mac	O
network	O
,	O
it	O
is	O
possible	O
for	O
the	O
login	O
keychain	B-Application
's	O
password	O
to	O
lose	O
synchronization	O
if	O
the	O
user	O
's	O
login	O
password	O
is	O
changed	O
from	O
a	O
non-Mac	O
system	O
.	O
</s>
<s>
Some	O
network	O
administrators	O
react	O
to	O
this	O
by	O
deleting	O
the	O
keychain	B-Application
file	O
on	O
logout	O
,	O
so	O
that	O
a	O
new	O
one	O
will	O
be	O
created	O
next	O
time	O
the	O
user	O
logs	O
in	O
.	O
</s>
<s>
This	O
means	O
keychain	B-Application
passwords	O
will	O
not	O
be	O
remembered	O
from	O
one	O
session	O
to	O
the	O
next	O
,	O
even	O
if	O
the	O
login	O
password	O
has	O
not	O
been	O
changed	O
.	O
</s>
<s>
If	O
this	O
happens	O
,	O
the	O
user	O
can	O
restore	O
the	O
keychain	B-Application
file	O
in	O
~	O
/Library/Keychains/	O
from	O
a	O
backup	O
,	O
but	O
doing	O
so	O
will	O
lock	O
the	O
keychain	B-Application
,	O
which	O
will	O
then	O
need	O
to	O
be	O
unlocked	O
at	O
next	O
use	O
.	O
</s>
<s>
Keychains	B-Application
were	O
initially	O
developed	O
for	O
Apple	O
's	O
e-mail	O
system	O
,	O
PowerTalk	O
,	O
in	O
the	O
early	O
1990s	O
.	O
</s>
<s>
Among	O
its	O
many	O
features	O
,	O
PowerTalk	O
used	O
plug-ins	B-Application
that	O
allowed	O
mail	O
to	O
be	O
retrieved	O
from	O
a	O
wide	O
variety	O
of	O
mail	O
servers	O
and	O
online	O
services	O
.	O
</s>
<s>
The	O
keychain	B-Application
concept	O
naturally	O
"	O
fell	O
out	O
"	O
of	O
this	O
code	O
,	O
and	O
was	O
used	O
in	O
PowerTalk	O
to	O
manage	O
all	O
of	O
a	O
user	O
's	O
various	O
login	O
credentials	O
for	O
the	O
various	O
e-mail	O
systems	O
PowerTalk	O
could	O
connect	O
to	O
.	O
</s>
<s>
Keychain	B-Application
was	O
one	O
of	O
the	O
few	O
parts	O
of	O
PowerTalk	O
that	O
was	O
obviously	O
useful	O
"	O
on	O
its	O
own	O
"	O
,	O
which	O
suggested	O
it	O
should	O
be	O
promoted	O
to	O
become	O
a	O
part	O
of	O
the	O
basic	O
Mac	B-Application
OS	I-Application
.	O
</s>
<s>
It	O
was	O
not	O
until	O
the	O
return	O
of	O
Steve	O
Jobs	O
in	O
1997	O
that	O
Keychain	B-Application
concept	O
was	O
revived	O
from	O
the	O
now-discontinued	O
PowerTalk	O
.	O
</s>
<s>
By	O
this	O
point	O
in	O
time	O
the	O
concept	O
was	O
no	O
longer	O
so	O
unusual	O
,	O
but	O
it	O
was	O
still	O
rare	O
to	O
see	O
a	O
keychain	B-Application
system	O
that	O
was	O
not	O
associated	O
with	O
a	O
particular	O
piece	O
of	O
application	O
software	O
,	O
typically	O
a	O
web	B-Application
browser	I-Application
.	O
</s>
<s>
Keychain	B-Application
was	O
later	O
made	O
a	O
standard	O
part	O
of	O
Mac	B-Operating_System
OS	I-Operating_System
9	I-Operating_System
,	O
and	O
was	O
included	O
in	O
Mac	B-Application
OS	I-Application
X	I-Application
in	O
the	O
first	O
commercial	O
versions	O
.	O
</s>
<s>
There	O
was	O
a	O
3rd	O
party	O
software	O
application	O
developed	O
,	O
that	O
enabled	O
synchronization	O
of	O
personal	O
keychains	B-Application
generated	O
using	O
keychain	B-Application
access	O
in	O
Mac	B-Application
OS	I-Application
X	I-Application
,	O
these	O
standard	O
keychain	B-Application
access	O
-	O
generated	O
users	O
keychains	B-Application
could	O
then	O
be	O
synchronised	O
between	O
devices	O
(	O
iPhones	O
-	O
desktop	O
Apple	O
computers	O
)	O
,	O
using	O
a	O
pair	O
of	O
keychain	B-Application
synchronization	O
apps	O
developed	O
by	O
Patrick	O
Stein	O
of	O
Jinx	O
Software	O
,	O
one	O
for	O
Mac	B-Application
OS	I-Application
X	I-Application
and	O
another	O
for	O
iOS	O
called	O
Keychain2Go	O
.	O
</s>
<s>
Keychain2Go	O
could	O
not	O
be	O
successfully	O
updated	O
by	O
the	O
developer	O
to	O
account	O
for	O
restrictions	O
that	O
Apple	O
made	O
to	O
Keychain	B-Application
and	O
access	O
to	O
Keychain	B-Application
in	O
Mac	B-Application
OS	I-Application
X	I-Application
Sierra	O
10.12	O
.	O
</s>
<s>
Keychain	B-Application
is	O
distributed	O
with	O
both	O
iOS	O
and	O
macOS	B-Application
.	O
</s>
<s>
The	O
iOS	O
version	O
is	O
simpler	O
because	O
applications	O
that	O
run	O
on	O
mobile	O
devices	O
typically	O
need	O
only	O
very	O
basic	O
Keychain	B-Application
features	O
.	O
</s>
<s>
For	O
example	O
,	O
features	O
such	O
as	O
ACLs	O
(	O
Access	O
Control	O
Lists	O
)	O
and	O
sharing	O
Keychain	B-Application
items	O
between	O
different	O
apps	O
are	O
not	O
present	O
.	O
</s>
<s>
Thus	O
,	O
iOS	O
Keychain	B-Application
items	O
are	O
only	O
accessible	O
to	O
the	O
app	O
that	O
created	O
them	O
.	O
</s>
<s>
As	O
Mac	O
users’	O
default	O
storage	O
for	O
sensitive	O
information	O
,	O
Keychain	B-Application
is	O
a	O
prime	O
target	O
for	O
security	O
attacks	O
.	O
</s>
<s>
In	O
2019	O
,	O
18-year-old	O
German	O
security	O
researcher	O
Linus	O
Henze	O
demonstrated	O
his	O
hack	O
,	O
dubbed	O
KeySteal	O
,	O
that	O
grabs	O
passwords	O
from	O
the	O
Keychain	B-Application
.	O
</s>
<s>
Initially	O
,	O
he	O
withheld	O
details	O
of	O
the	O
hack	O
,	O
demanding	O
Apple	O
set	O
up	O
a	O
bug	O
bounty	O
for	O
macOS	B-Application
.	O
</s>
<s>
It	O
utilized	O
Safari	O
's	O
access	O
to	O
security	O
services	O
,	O
disguised	O
as	O
a	O
utility	O
in	O
macOS	B-Application
that	O
enables	O
IT	O
administrators	O
to	O
manipulate	O
keychains	B-Application
.	O
</s>
