Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Olm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
Olm
Commits
49c117c6
Commit
49c117c6
authored
9 years ago
by
Mark Haines
Browse files
Options
Downloads
Patches
Plain Diff
Start writing protocol spec for olm
parent
41a8fb61
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/olm.rst
+42
-0
42 additions, 0 deletions
docs/olm.rst
with
42 additions
and
0 deletions
docs/olm.rst
0 → 100644
+
42
−
0
View file @
49c117c6
Olm: A Crytographic Ratchet
===========================
An implementation of the cryptographic ratchet described by
https://github.com/trevp/axolotl/wiki.
The Olm Algorithm
-----------------
.. figure:: Axolotl.svg
Initial setup
~~~~~~~~~~~~~
The setup takes four Curve25519 inputs: Identity keys for Alice and Bob,
:math:`I_A` and :math:`I_B`, and emphemeral keys for Alice and Bob,
:math:`E_A` and :math:`E_B`. A shared secret, :math:`S`, is generated using
Triple Diffie-Hellman. The initial 256 bit root key, :math:`R_0`, and 256 bit
chain key, :math:`C_{0,0}`, are derived from the shared secret using an
HMAC-based Key Derivation Function (HKDF).
.. math::
\begin{align}
S&=ECDH\left(I_A,\,E_B\right)\;\parallel\;ECDH\left(E_A,\,I_B\right)\;
\parallel\;ECDH\left(E_A,\,E_B\right)\\
R_0\;\parallel\;C_{0,0}&=HKDF(S,\,\text{"OLM\_ROOT"})
\end{align}
Advancing the root key
~~~~~~~~~~~~~~~~~~~~~~
Advancing a root key takes the previous root key, :math:`R_{i-1}`, and two
Curve25519 inputs: The previous ratchet key, :math:`T_{i-1}`, and the current
ratchet key :math:`T_{i}`. The even ratchet keys are generated by Alice.
The odd ratchet keys are generated by Bob. A shared secret, `S` is generated
using Diffie-Hellman on the ratchet keys. The next root key, :math:`R_o`, and
chain key, :math:`C_{i,0}`, are derived from the shared secret using an
HMAC-based Key Derivation Function (HKDF).
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