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

Constant-time & randombytes #325

Closed
vbgl opened this issue Jan 12, 2023 · 0 comments
Closed

Constant-time & randombytes #325

vbgl opened this issue Jan 12, 2023 · 0 comments

Comments

@vbgl
Copy link
Member

vbgl commented Jan 12, 2023

Is the following program secure (w.r.t. the constant-time policy)?

export
fn main() -> #secret reg u64 {
  stack u64[1] s;
  reg u64 r;
  s = #randombytes(s);
  r = s[0];
  while (r < 64) {
    r += 64;
  }
  return r;
}

jasminc -checkCT claims its OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant