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 SM4 rules #428

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions crypto/crypto_signatures.yar
Original file line number Diff line number Diff line change
Expand Up @@ -1171,6 +1171,42 @@ rule RsaEuro_NN_modMult
$c0
}

rule SM4_SBox
{ meta:
author = "spelissier"
description = "SM4 SBox"
date = "2022-05"
reference="https://datatracker.ietf.org/doc/html/draft-ribose-cfrg-sm4-10#section-6.2.3"
strings:
$c0 = { D6 90 E9 FE CC E1 3D B7 16 B6 14 C2 28 FB 2C 05 }
condition:
$c0
}

rule SM4_FK
{ meta:
author = "spelissier"
description = "SM4 Familiy key FK"
date = "2022-05"
reference="https://datatracker.ietf.org/doc/html/draft-ribose-cfrg-sm4-10#section-7.3.1"
strings:
$c0 = { C6 BA B1 A3 50 33 AA 56 97 91 7D 67 DC 22 70 B2 }
condition:
$c0
}

rule SM4_CK
{ meta:
author = "spelissier"
description = "SM4 Constant Key CK"
date = "2022-05"
reference="https://datatracker.ietf.org/doc/html/draft-ribose-cfrg-sm4-10#section-7.3.2"
strings:
$c0 = { 15 0E 07 00 31 2A 23 1C 4D 46 3F 38 69 62 5B 54 }
condition:
$c0
}

rule Miracl_Big_constructor
{ meta:
author = "Maxx"
Expand Down