Skip to content

Constant-time violations for div[u][w] and rem[u][w] #47

@TobiasKovats

Description

@TobiasKovats

Hi,

we have discovered that several instructions in OpenC910 (commit e0c4ad8) have data-dependent execution times, which could break the security assumptions of constant-time crypto code. The vulnerable instructions are as follows:


- div
- divu
- divw
- divuw
- rem
- remu
- remw
- remuw

The following depicts the traces for the div instruction for two different sets of inputs, resulting in different execution times.
Since the remaining instructions rely on the same execution unit, they are equally affected by this behaviour.

Image
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions