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

Make pieces::Stack methods private. #1202

Merged
merged 1 commit into from
Jul 7, 2020
Merged

Conversation

porcuquine
Copy link
Collaborator

The pieces::Stack struct is only used in the implementation of compute_comm_d, and accurate usage of its helper methods is required for correctness. For example, peek() and peek2 must not be called when the stack is not large enough. This correctness is guaranteed by usage of Stack as a helper data structure within compute_comm_d as written, but there is no reason to expose these methods to callers who might misuse them. Put differently, correctness of the Stack data structure depends on these methods being private. This allows a reader to determine — by only inspecting the pieces module — that these methods are never called incorrectly.

@porcuquine porcuquine added the cryptocomputelab CryptoComputeLab work label Jul 6, 2020
Copy link
Collaborator

@cryptonemo cryptonemo 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 pending CI

@porcuquine porcuquine merged commit 2609706 into master Jul 7, 2020
@porcuquine porcuquine deleted the fix/piece-stack-methods branch July 7, 2020 00:15
@porcuquine
Copy link
Collaborator Author

This is a further response to Security Audit FPS-11.

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

Successfully merging this pull request may close these issues.

2 participants