SlideShare a Scribd company logo
Machine Assisted Verification Tools for
Cryptography
Paulo Silva1

Manuel Barbosa1

1 Departamento de Informática
Computer Science and Technology Centre (CCTC/DI)
Universidade do Minho
Portugal

October 13, 2010
Computer Aided Cryptography Engineering (CACE)

European FP7 Project
(http://www.cace-project.eu)
Overal objectives:
Design, develop and deploy a toolbox for cryptographic
software engineering
Allow non-experts to develop high-level cryptographic
applications using cryptography-aware programming
languages and tools

Our group is responsible for the Work Package 5 (WP5):
Formal Verification and Validation of Cryptographic
Software
Formal Verification and Validation (WP5)

Adapt validation, verification and certification of secure
software techniques to the CACE project
Extend languages and tools to include machine assisted
verification of correctness and conformance to security
policies
Implement a certified shared library core
CAO Language
CAO Language

Small and simple domain specific language
Geared toward the automatic production of highly efficient
target code subject to security-aware optimizations
Close to cryptographic standards
Type system supports cryptographic types such as bit
strings, matrices and field extensions
We have a complete formalization of CAO’s:
Syntax
Semantics
Type system

We have implemented a fully functional CAO interpreter
CAO Language Example (AES fragment)
typedef GF2 := mod[ 2 ];
typedef GF2N :=
mod[ GF2<X> / X**8 + X**4 + X**3 + X + 1 ];
typedef S
:= matrix[4,4] of GF2N;
def mix : matrix[4,4] of GF2N
{[X],[X+1],[1],[1],
[1],[X],[X+1],[1],
[1],[1],[X],[X+1],
[X+1],[1],[1],[X]};

:=

def MixColumns( s : S ) : S {
def r : S;
seq i := 0 to 3 {
r[0..3,i] := mix * s[0..3,i]; }
return r; }
Deductive Verification
Deductive Verification

Tools based on variations of Hoare logic
Axioms and inference rules capture the semantics of
imperative languages
Programs are bound to contracts: a pre- and a
post-condition
If pre-condition is met at the inputs, program guarantees
post-conditions at the outputs
Deductive Verification
Annotation Language (CAO-SL) Properties that must be
proven (specification) and extra information to
facilitate verification are included in source code
as annotations.
Verification condition generator (VCGen) The annotated
program is used to generate a set of proof
obligations. The validity of these proof obligations
will imply that the software is indeed correct with
respect to the specification.
Proof generation Proof obligations are theorems of first-order
logic that must be proven, using a first-order
automatic proof tool (e.g. Simplify) or a proof
assistant (e.g. Coq) to construct the proof.
CALF Language
CALF Language

Higher-level than CAO
More powerful abstraction to write generic code
A suitable candidate for direct translation and
implementation of cryptographic standards
Static verification and pre-processing tool for enhanced
CAO source code.
CALF to CAO compiler

High-assurance compiler that translates CALF to CAO
code
Advanced type system based on dependent types to
ensure that certain properties are met
More manageable than deductive verification
May be used to reduce the number of proof obligations
Example: ensures that the access to a vector position is
within bounds (memory safe)
CALF Language Example (RSA fragment)

typedef RSAPub<(n : int)> :=
struct [ def e : int; ];
def RSA<(n : int)>(k : RSAPub<(n)>, m : int ) : int
{
def c : mod[n];
c := (mod[n]) m;
c := c ** k.e;
return (int) c;
}
Ongoing Work

Proofs about CAO formalization, namely, type safety
Data type classifiers
Verification of cryptographic libraries (NaCl)
Compiler from CAO to C

More Related Content

PDF
Development process Model of Bhadani Technologies
PDF
Viktor Tokar CV
PPTX
p4pktgen: Automated Test Case Generation for P4 Programs
PDF
Work Experience
PDF
RESUME_VLSI
PPTX
BSides Rochester 2018: Drew Kirkpatrick: Open Source SAST and DAST Tools for ...
DOC
subbu_resume
DOCX
Mani resume
Development process Model of Bhadani Technologies
Viktor Tokar CV
p4pktgen: Automated Test Case Generation for P4 Programs
Work Experience
RESUME_VLSI
BSides Rochester 2018: Drew Kirkpatrick: Open Source SAST and DAST Tools for ...
subbu_resume
Mani resume

What's hot (18)

PPTX
Using gcov and lcov
DOC
resume_Harikrishnan
DOC
Ramya Resume
DOC
RajeswaraRao_Resume_3years
DOCX
Robin Singh-Fd
DOCX
Anjaneya Gupta_CV
PDF
Manoj_Resume
DOCX
Updated Resume
DOCX
NAVEENRAJ B KALI
PDF
Software Engineering Culture - Improve Code Quality
PDF
Rahul_Ramani_Profile
DOC
Kumar_J
PDF
Resume lukeman hakkimsheikalavudeen
PDF
Pro_Tools_Tier_1 cert
PDF
SonarQube와 함께하는 소프트웨어 품질 세미나 - 지속적인 코드 인스펙션 SonarQube 활용 방안
DOC
Resume
PDF
Mesa_Yogananda_ASIC_FPGA_Verification
PDF
Pro Tools Tier 2
Using gcov and lcov
resume_Harikrishnan
Ramya Resume
RajeswaraRao_Resume_3years
Robin Singh-Fd
Anjaneya Gupta_CV
Manoj_Resume
Updated Resume
NAVEENRAJ B KALI
Software Engineering Culture - Improve Code Quality
Rahul_Ramani_Profile
Kumar_J
Resume lukeman hakkimsheikalavudeen
Pro_Tools_Tier_1 cert
SonarQube와 함께하는 소프트웨어 품질 세미나 - 지속적인 코드 인스펙션 SonarQube 활용 방안
Resume
Mesa_Yogananda_ASIC_FPGA_Verification
Pro Tools Tier 2
Ad

Similar to Machine Assisted Verification Tools for Cryptography (20)

PDF
Dependent Types for Cryptography Implementations
PDF
Aaron Bedra - Effective Software Security Teams
PDF
Compiling CAO: From Cryptographic Specifications to C Implementations
PDF
Aizatulin
PPTX
Formal analysis-crypto-proto
PDF
PDF
Rencontres Inria Industrie - Qualité logicielle - OWF13
PDF
Dupressoir
PDF
FASE 2011 - Formalizing and Operationalizing Industrial Standards
PPTX
A study of cryptography for satellite applications
PDF
Formal Verification: Academic Research in the UK
PDF
Bristol 2009 q1_eder_kersten
PDF
Aizatulin slides-4-3
PDF
EXTENT-2016: Industry Practices of Advanced Program Analysis
PDF
Computer Aided Verification 22nd International Conference Cav 2010 Edinburgh ...
PPT
syysyshsgshsuauajajagwtwyavavansnejeuwgwgwvsjsjwh.ppt
PDF
Specification-based Verification of Incomplete Programs
PDF
Computer Aided Verification 19th International Conference Cav 2007 Berlin Ger...
PDF
Study and implementation of DES on FPGA
PPT
Lecture6 rsa
Dependent Types for Cryptography Implementations
Aaron Bedra - Effective Software Security Teams
Compiling CAO: From Cryptographic Specifications to C Implementations
Aizatulin
Formal analysis-crypto-proto
Rencontres Inria Industrie - Qualité logicielle - OWF13
Dupressoir
FASE 2011 - Formalizing and Operationalizing Industrial Standards
A study of cryptography for satellite applications
Formal Verification: Academic Research in the UK
Bristol 2009 q1_eder_kersten
Aizatulin slides-4-3
EXTENT-2016: Industry Practices of Advanced Program Analysis
Computer Aided Verification 22nd International Conference Cav 2010 Edinburgh ...
syysyshsgshsuauajajagwtwyavavansnejeuwgwgwvsjsjwh.ppt
Specification-based Verification of Incomplete Programs
Computer Aided Verification 19th International Conference Cav 2007 Berlin Ger...
Study and implementation of DES on FPGA
Lecture6 rsa
Ad

Recently uploaded (20)

PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Spectroscopy.pptx food analysis technology
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Machine Learning_overview_presentation.pptx
PPTX
1. Introduction to Computer Programming.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Big Data Technologies - Introduction.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
NewMind AI Weekly Chronicles - August'25-Week II
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Spectroscopy.pptx food analysis technology
“AI and Expert System Decision Support & Business Intelligence Systems”
Building Integrated photovoltaic BIPV_UPV.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Advanced methodologies resolving dimensionality complications for autism neur...
Machine Learning_overview_presentation.pptx
1. Introduction to Computer Programming.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Reach Out and Touch Someone: Haptics and Empathic Computing
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Unlocking AI with Model Context Protocol (MCP)
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Dropbox Q2 2025 Financial Results & Investor Presentation
Encapsulation_ Review paper, used for researhc scholars
20250228 LYD VKU AI Blended-Learning.pptx
Big Data Technologies - Introduction.pptx

Machine Assisted Verification Tools for Cryptography

  • 1. Machine Assisted Verification Tools for Cryptography Paulo Silva1 Manuel Barbosa1 1 Departamento de Informática Computer Science and Technology Centre (CCTC/DI) Universidade do Minho Portugal October 13, 2010
  • 2. Computer Aided Cryptography Engineering (CACE) European FP7 Project (http://www.cace-project.eu) Overal objectives: Design, develop and deploy a toolbox for cryptographic software engineering Allow non-experts to develop high-level cryptographic applications using cryptography-aware programming languages and tools Our group is responsible for the Work Package 5 (WP5): Formal Verification and Validation of Cryptographic Software
  • 3. Formal Verification and Validation (WP5) Adapt validation, verification and certification of secure software techniques to the CACE project Extend languages and tools to include machine assisted verification of correctness and conformance to security policies Implement a certified shared library core
  • 5. CAO Language Small and simple domain specific language Geared toward the automatic production of highly efficient target code subject to security-aware optimizations Close to cryptographic standards Type system supports cryptographic types such as bit strings, matrices and field extensions We have a complete formalization of CAO’s: Syntax Semantics Type system We have implemented a fully functional CAO interpreter
  • 6. CAO Language Example (AES fragment) typedef GF2 := mod[ 2 ]; typedef GF2N := mod[ GF2<X> / X**8 + X**4 + X**3 + X + 1 ]; typedef S := matrix[4,4] of GF2N; def mix : matrix[4,4] of GF2N {[X],[X+1],[1],[1], [1],[X],[X+1],[1], [1],[1],[X],[X+1], [X+1],[1],[1],[X]}; := def MixColumns( s : S ) : S { def r : S; seq i := 0 to 3 { r[0..3,i] := mix * s[0..3,i]; } return r; }
  • 8. Deductive Verification Tools based on variations of Hoare logic Axioms and inference rules capture the semantics of imperative languages Programs are bound to contracts: a pre- and a post-condition If pre-condition is met at the inputs, program guarantees post-conditions at the outputs
  • 9. Deductive Verification Annotation Language (CAO-SL) Properties that must be proven (specification) and extra information to facilitate verification are included in source code as annotations. Verification condition generator (VCGen) The annotated program is used to generate a set of proof obligations. The validity of these proof obligations will imply that the software is indeed correct with respect to the specification. Proof generation Proof obligations are theorems of first-order logic that must be proven, using a first-order automatic proof tool (e.g. Simplify) or a proof assistant (e.g. Coq) to construct the proof.
  • 11. CALF Language Higher-level than CAO More powerful abstraction to write generic code A suitable candidate for direct translation and implementation of cryptographic standards Static verification and pre-processing tool for enhanced CAO source code.
  • 12. CALF to CAO compiler High-assurance compiler that translates CALF to CAO code Advanced type system based on dependent types to ensure that certain properties are met More manageable than deductive verification May be used to reduce the number of proof obligations Example: ensures that the access to a vector position is within bounds (memory safe)
  • 13. CALF Language Example (RSA fragment) typedef RSAPub<(n : int)> := struct [ def e : int; ]; def RSA<(n : int)>(k : RSAPub<(n)>, m : int ) : int { def c : mod[n]; c := (mod[n]) m; c := c ** k.e; return (int) c; }
  • 14. Ongoing Work Proofs about CAO formalization, namely, type safety Data type classifiers Verification of cryptographic libraries (NaCl) Compiler from CAO to C