Skip to content
New issue

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

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

Already on GitHub? # to your account

Use CSPRNG for judge keys #1757

Merged
merged 1 commit into from
Aug 26, 2021
Merged

Use CSPRNG for judge keys #1757

merged 1 commit into from
Aug 26, 2021

Conversation

int-y1
Copy link
Contributor

@int-y1 int-y1 commented Aug 26, 2021

Fixes #1175. Makes #1176 redundant.

This code was borrowed from Google. In this case, 75 random bytes are encoded to 100 base64 characters.

@codecov-commenter
Copy link

Codecov Report

Merging #1757 (59b1bba) into master (bf3fbaf) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1757   +/-   ##
=======================================
  Coverage   46.16%   46.16%           
=======================================
  Files         223      223           
  Lines       12658    12658           
=======================================
  Hits         5844     5844           
  Misses       6814     6814           
Impacted Files Coverage Δ
judge/admin/runtime.py 66.66% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bf3fbaf...59b1bba. Read the comment docs.

Copy link
Contributor

@fluix-dev fluix-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As hacky as that conversion looks, it seems correct. As an FYI the linked code is licensed under Apache 2.0 but no clue if these 3 lines are copyrightable anyways.

Copy link
Member

@quantum5 quantum5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Also Apache 2.0 is compatible with AGPL so it's not a problem even if it's copyrightable.

@quantum5 quantum5 merged commit f14c877 into DMOJ:master Aug 26, 2021
@int-y1 int-y1 deleted the judge-key-rng branch August 27, 2021 21:01
@quantum5 quantum5 mentioned this pull request Sep 23, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use a CSPRNG to generate judge keys
4 participants