Salvato in:
Dettagli Bibliografici
Autori principali: Zetzsche, Stefan, Tristan, Jean-Baptiste, Lepoint, Tancrede, Mayer, Mikael
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:https://arxiv.org/abs/2501.06084
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866917889195376640
author Zetzsche, Stefan
Tristan, Jean-Baptiste
Lepoint, Tancrede
Mayer, Mikael
author_facet Zetzsche, Stefan
Tristan, Jean-Baptiste
Lepoint, Tancrede
Mayer, Mikael
contents The Fisher-Yates shuffle is a well-known algorithm for shuffling a finite sequence, such that every permutation is equally likely. Despite its simplicity, it is prone to implementation errors that can introduce bias into the generated permutations. We verify its correctness in Dafny as follows. First, we define a functional model that operates on sequences and streams of random bits. Second, we establish that the functional model has the desired distribution. Third, we define an executable imperative implementation that operates on arrays and prove it equivalent to the functional model. The approach may serve as a blueprint for the verification of more complex algorithms.
format Preprint
id arxiv_https___arxiv_org_abs_2501_06084
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Verifying the Fisher-Yates Shuffle Algorithm in Dafny
Zetzsche, Stefan
Tristan, Jean-Baptiste
Lepoint, Tancrede
Mayer, Mikael
Cryptography and Security
The Fisher-Yates shuffle is a well-known algorithm for shuffling a finite sequence, such that every permutation is equally likely. Despite its simplicity, it is prone to implementation errors that can introduce bias into the generated permutations. We verify its correctness in Dafny as follows. First, we define a functional model that operates on sequences and streams of random bits. Second, we establish that the functional model has the desired distribution. Third, we define an executable imperative implementation that operates on arrays and prove it equivalent to the functional model. The approach may serve as a blueprint for the verification of more complex algorithms.
title Verifying the Fisher-Yates Shuffle Algorithm in Dafny
topic Cryptography and Security
url https://arxiv.org/abs/2501.06084