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

add a missing default case to hmac_drbg_interface #237

Closed
mojtaba-bisheh opened this issue Oct 3, 2023 · 2 comments
Closed

add a missing default case to hmac_drbg_interface #237

mojtaba-bisheh opened this issue Oct 3, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@mojtaba-bisheh
Copy link
Contributor

There is a missing "default case" to caliptra-rtl/src/ecc/rtl/ecc_hmac_drbg_interface.sv line 220 found by FPV team.
The following fix has been implemented internally to address this issue:

            if (hmac_done_edge) begin
                unique case (state_reg) inside
                    LFSR_ST:        lfsr_seed_reg   <= hmac_drbg_result[147 : 0];
                    LAMBDA_ST:      lambda_reg      <= hmac_drbg_result;
                    SCALAR_RND_ST:  scalar_rnd_reg  <= hmac_drbg_result;
                    MASKING_RND_ST: masking_rnd_reg <= hmac_drbg_result;
                    KEYGEN_ST:      drbg_reg        <= hmac_drbg_result;
                    SIGN_ST:        drbg_reg        <= hmac_drbg_result;
                    default: begin
                        lambda_reg <= '0;
                        scalar_rnd_reg <= '0;
                        masking_rnd_reg <= '0;
                        drbg_reg <= '0;
                        lfsr_seed_reg <= LFSR_INIT_SEED;
                    end
                endcase
            end
@mojtaba-bisheh mojtaba-bisheh self-assigned this Oct 3, 2023
@mojtaba-bisheh mojtaba-bisheh added the bug Something isn't working label Oct 3, 2023
@calebofearth
Copy link
Collaborator

Note: The merge of this fix to the public repo is in progress:
e90baa9

@mojtaba-bisheh
Copy link
Contributor Author

#240 fixed this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants