arrow-left

All pages
gitbookPowered by GitBook
1 of 2

Loading...

Loading...

Sample Page

A rough guideline to a page

hashtag
Introduction

Give a description of the topic, and what you hope the reader will get from this. For example, this page will cover addition of the natural numbers. Talk about how this relates to something in cryptography, either through a protocol, or an attack. This can be a single sentence, or verbose.

hashtag
Laws of Addition

For all integers, the addition operation is

  • Associative:

  • Commutative:

  • Distributive:

hashtag
Interesting Identity

hashtag
Sage Example

hashtag
Further Resources

  • Links to

  • Other interesting

  • Resources

hashtag

Contains an identity element: a+0=0+a=aa + 0 = 0 + a = aa+0=0+a=a

  • Has an inverse for every element: a+(−a)=(−a)+a=0a + (-a) = (-a) + a = 0a+(−a)=(−a)+a=0

  • Closed: ∀a,b∈Z,a+b∈Z\forall a, b \in \mathbb{Z}, a + b \in \mathbb{Z}∀a,b∈Z,a+b∈Z

  • a+(b+c)=(a+b)+ca + (b + c) = (a + b) + ca+(b+c)=(a+b)+c
    a+b=b+aa + b = b + aa+b=b+a
    a(b+c)=ab+aca(b + c) = ab + aca(b+c)=ab+ac
    (1+2+3+…+n)2=13+23+33+…+n3(1 + 2 + 3 + \ldots + n)^2 = 1^3 + 2^3 + 3^3 + \ldots + n^3(1+2+3+…+n)2=13+23+33+…+n3
    sage: 1 + (2 + 3) == (1 + 2) + 3
    True
    sage: 1 + 2 == 2 + 1
    True
    sage: 5*(7 + 11) == 5*7 + 5*11
    True
    sage: sum(i for i in range(1000))^2 == sum(i^3 for i in range(1000))
    True

    Style Guide

    Work in progress

    hashtag
    Working together

    • If something doesn't make sense, make a comment using GitBook, or ask in the Discord.

    • If you are confident that something is wrong, just fix it. There's no need to ask.

    • If you think something doesn't have enough detail, expand on it, or leave a comment suggesting that.

    • If a page is getting too long, break it down into new pages. If you're unsure, then leave a comment or talk in the discord

    • If you want to write about something new and learn as you type, this is fine! But please leave a warning at the top that this is new to you and needs another pair of eyes.

    • If there's big subject you're working on, claim the page and save it, show us that that's what you're doing so we don't overlap too much

    hashtag
    General Tips

    • Introduce new objects slowly, if many things need to be assumed, then try to plan for them to appear within the somewhere.

    • It is better to cover less, and explain something well, than it is to quickly cover a lot. We're not racing

    • When explaining anything, imagine you are introducing it for a first time. Summaries exist elsewhere online, the goal of CryptoBook is education

    circle-exclamation

    If anything on any page is unclear, then please leave a comment, or talk in the discord. We are all at different levels, and I want this to be useful for everyone. Let's work on this as a big team and create something beautiful.

    • Try and use the hints / tips blocks to break up dense text, for example:

    circle-info

    To use , you can wrap your text in $$maths here$$. If this is at the beginning of a paragraph, it makes it block, otherwise it is inline

    hashtag
    Page Structure

    • A page should have a clear educational goal: this should be explained in the introduction. References to prerequisites should be kept within the book and if the book doesnt have this yet, it should be placed into .

    • The topic should be presented initially with theory, showing the mathematics and structures we will need. A discussion should be pointed towards how this appears within Cryptography

    circle-check

    Motivating a new reader is the biggest challenge of creating a resource. People will be coming here to understand cryptography and SageMath, so keep pointing back to the goal!

    • Within a discussion of a topic, a small snippet of code to give an example is encouraged

    • If you write code better than you write maths, then just include what you can and the page will form around that

    • An example page is given in

    hashtag
    Formatting

    hashtag
    Mathematics notation

    There's no "right or wrong" but it's good to be consistent, I think?

    • All maths must be presented using using either both block and inline

    • We seem to be using mathbb for our fields / rings. So let's stick with that? Maybe someone has a good resource for notation we can work from?

    hashtag
    Code Blocks

    • Make sure all code blocks have the right language selected for syntax highlighting

    • Preference is to SageMath, then to Python, then others.

    • Code should be cope-pastable. So if you include print statement, include the result of the output as a comment

    hashtag
    Algorithms

    • Algorithms should be presented as??

    Contribute as much or as little as you want, but try to only work on topics that

    • You are interested in

    • You have some experience of thinking about

  • External resources should be included at the end of the page. Ideally the book should be self-contained (within reason) but other resources are great as they offer other ways to learn

  • LaTeX\LaTeXLATE​X
    LaTeX\LaTeXLATE​X
    Book Plan
    Book Plan
    Sample Page
    # Example
    a = 3
    b = 6
    print(a+b)
    # 9
    // todo