# Secured #6 - Writing Robust C - Best Practices for Finding and Preventing Vulnerabilities

DevFeed: [Secured #6 - Writing Robust C - Best Practices for Finding and Preventing Vulnerabilities](<https://devfeed.tech/articles/secured-6-writing-robust-c-best-practices-for-finding-and-preventing-vulnerabilities-17078.md>)

Original publisher: [Read original article](<https://blog.ethereum.org/en/2023/11/02/writing-robust-c>)

Author: Justin Traglia

Published: 2023-11-02T00:00:00Z

Content type: article

Language: en

Sources: [Ethereum Foundation Blog](<https://devfeed.tech/sources/ethereum-foundation-blog.md>)

Topics: [Ethereum](<https://devfeed.tech/topics/ethereum.md>), [C](<https://devfeed.tech/topics/c.md>), [Fuzzing/Fuzz testing](<https://devfeed.tech/topics/fuzzing.md>), [Library](<https://devfeed.tech/topics/library.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Security](<https://devfeed.tech/topics/security.md>), [LLVM](<https://devfeed.tech/topics/llvm.md>), [make](<https://devfeed.tech/topics/make.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [ethereum](<https://devfeed.tech/tags/ethereum.md>), [fuzzing](<https://devfeed.tech/tags/fuzzing.md>), [library](<https://devfeed.tech/tags/library.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [make](<https://devfeed.tech/tags/make.md>), [research-development](<https://devfeed.tech/tags/research-development.md>), [security](<https://devfeed.tech/tags/security.md>), [testing](<https://devfeed.tech/tags/testing.md>), [vulnerabilities](<https://devfeed.tech/tags/vulnerabilities.md>)

## AI overview

The article explains how Ethereum developers secured the c-kzg-4844 C library used by clients to compute and verify KZG commitments for EIP-4844. It covers LibFuzzer-based testing, differential fuzzing against go-kzg-4844, and coverage analysis with LLVM tools.

## Source excerpt

For EIP-4844, Ethereum clients need the ability to compute and verify KZG commitments. Rather than each client rolling their own crypto, researchers and developers came together to write c-kzg-4844, a relatively small C library with bindings for higher-level languages. The idea was to create a robust and efficient cryptographic library...