Skip to content

Conversation

cpu
Copy link
Member

@cpu cpu commented Jul 19, 2019

Quoting @agwa:

I believe this check does more harm than good.

A fully compliant CA which generates a random serial number from exactly 64 bits of entropy will produce a serial number less than 8 bytes long 1 in 256 times. That means that for every million certs issued, this check will cause about 4,000 false positives.

...

The only sensible way to detect low entropy is to run an analysis across a large corpus of certificates. If you try to detect it on a cert-by-cert basis you should at least have a much smaller minimum length than 8 so there's a lower false positive rate than 1/256.

I agree with the assessment the current w_serial_number_low_entropy lint does more harm than good. This commit removes it and the associated tests/testdata. The current design of zlint doesn't support the large corpus analysis that would be required for a proper replacement.

Resolves #270

Per zlint zmap#270:

> I believe this check does more harm than good.
>
>
> A fully compliant CA which generates a random serial number from
> exactly 64 bits of entropy will produce a serial number less than
> 8 bytes long 1 in 256 times. That means that for every million certs
> issued, this check will cause about 4,000 false positives.
>
> ...
>
> The only sensible way to detect low entropy is to run an analysis
> across a large corpus of certificates. If you try to detect it on
> a cert-by-cert basis you should at least have a much smaller minimum
> length than 8 so there's a lower false positive rate than 1/256.

This commit removes the `w_serial_number_low_entropy` lint and
associated tests/testdata.
@cpu cpu self-assigned this Jul 19, 2019
@zakird zakird merged commit a0632ad into zmap:master Jul 20, 2019
@cpu cpu deleted the cpu-serial-killer branch July 21, 2019 12:52
aaomidi pushed a commit to aaomidi/zlint that referenced this pull request Nov 29, 2022
…ng (zmap#298)

* backporting asn1, pkix to allow permissive parsing (zmap#284)

* forking from golang.org/x/crypto/cryptobyte to allow permissive parsing

* Allow permissive asn1 parsing on UTF8, integer and NameConstraints (zmap#287)

* Allow permissive asn1 parsing on UTF8, integer and NameConstraints

* Allow permissive asn1 parsing on UTF8, integer and NameConstraints, NumericString

* Allow permissive parsing: IA5, integer min len (zmap#289)

* Fix Name.String() to legacy behavior, permissive parsing asn1.IA5String (zmap#292)

* deps: update publicsuffix-go for 2021-05-11T10:35:34 UTC

* deps: update publicsuffix-go for 2021-05-13T08:40:11 UTC

* deps: update publicsuffix-go for 2021-05-21T08:41:21 UTC

* deps: update publicsuffix-go for 2021-05-27T09:03:28 UTC

* Allow permissive parsing: IA5, integer min len

* Fix Name.String() to legacy behavior

Co-authored-by: GitHub <noreply@github.com>

* Fix RDNSequence.String() to print user friendly names (zmap#294)

* Merge branch master into feature/parse_certs (zmap#296)

* deps: update publicsuffix-go for 2021-05-11T10:35:34 UTC

* deps: update publicsuffix-go for 2021-05-13T08:40:11 UTC

* deps: update publicsuffix-go for 2021-05-21T08:41:21 UTC

* deps: update publicsuffix-go for 2021-05-27T09:03:28 UTC

* deps: update publicsuffix-go for 2021-06-01T15:03:13 UTC

* Fix RDNSequence.String() to print user friendly names

* Porting ocsp package from the latest standard lib (zmap#279)

Co-authored-by: Zakir Durumeric <zakird@gmail.com>

* deps: update publicsuffix-go for 2021-06-07T12:03:41 UTC

Co-authored-by: GitHub <noreply@github.com>
Co-authored-by: Daniel McCarney <daniel@binaryparadox.net>
Co-authored-by: Zakir Durumeric <zakird@gmail.com>

Co-authored-by: Benjamin Wireman <ben@censys.io>
Co-authored-by: GitHub <noreply@github.com>
Co-authored-by: Daniel McCarney <daniel@binaryparadox.net>
Co-authored-by: Zakir Durumeric <zakird@gmail.com>
Co-authored-by: Jeff Cody <jeff@codyprime.org>
aaomidi added a commit to aaomidi/zlint that referenced this pull request Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove the low entropy serial number check
2 participants