Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix LeiA epoch overflow vulnerability #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions can-auth/leia.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ void VULCAN_FUNC leia_session_key_gen(void)
ASSERT(leia_cur);

// 1. increment epoch
// NOTE: should request new random session key from trusted global
// Attestation Server on epoch counter overflow (see VulCAN paper)
ASSERT(leia_cur->epoch != LEIA_EPOCH_MAX);
leia_cur->epoch++;

// 2. apply the MAC algorithm on the epoch
Expand All @@ -95,9 +98,6 @@ void VULCAN_FUNC leia_update_counters(void)

if (leia_cur->c == LEIA_COUNT_MAX)
{
// NOTE: should request new random session key from trusted global
// Attestation Server on epoch counter overflow (see VulCAN paper)
ASSERT(leia_cur->epoch != LEIA_EPOCH_MAX);
leia_session_key_gen();
}
else
Expand Down