Friday, August 18, 2023, 19:30:01 + 6

main
shwetha729 2023-08-18 19:30:13 -04:00
parent 27c9865cc3
commit ace089060f
3 changed files with 67 additions and 15 deletions

View File

@ -59,7 +59,7 @@
"state": {
"type": "markdown",
"state": {
"file": "Coding Tips (Classical)/Terminal Tips/Servers/Physical Servers/Raspberry Pis.md",
"file": "Proof of a formula for modulo.md",
"mode": "source",
"source": false
}
@ -95,7 +95,7 @@
"state": {
"type": "search",
"state": {
"query": "PWA",
"query": "latex",
"matchingCase": false,
"explainSearch": false,
"collapseAll": false,
@ -116,7 +116,8 @@
}
],
"direction": "horizontal",
"width": 332.5
"width": 332.5,
"collapsed": true
},
"right": {
"id": "5fd977257f812825",
@ -132,7 +133,7 @@
"state": {
"type": "backlink",
"state": {
"file": "Coding Tips (Classical)/Terminal Tips/Servers/Physical Servers/Raspberry Pis.md",
"file": "Proof of a formula for modulo.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
@ -149,7 +150,7 @@
"state": {
"type": "outgoing-link",
"state": {
"file": "Coding Tips (Classical)/Terminal Tips/Servers/Physical Servers/Raspberry Pis.md",
"file": "Proof of a formula for modulo.md",
"linksCollapsed": false,
"unlinkedCollapsed": true
}
@ -172,7 +173,7 @@
"state": {
"type": "outline",
"state": {
"file": "Coding Tips (Classical)/Terminal Tips/Servers/Physical Servers/Raspberry Pis.md"
"file": "Proof of a formula for modulo.md"
}
}
}
@ -196,8 +197,15 @@
"omnisearch:Omnisearch": false
}
},
"active": "821695a40daeadc2",
"active": "232b6fc149c4f16b",
"lastOpenFiles": [
"Coding Tips (Classical)/Terminal Tips/Servers/Physical Servers/Raspberry Pis.md",
"Proof of a formula for modulo.md",
"Coding Tips (Classical)/Terminal Tips/Languages/LaTeX.md",
"Machine Tips (Quantum)/Math/Visualizing the Quantum Space.md",
"Machine Tips (Quantum)/Math/Quantum Formalism.md",
"Machine Tips (Quantum)/Math/Math terms & Probabilities.md",
"Machine Tips (Quantum)/Math/Math Software.md",
"Coding Tips (Classical)/Terminal Tips/Servers/Virtual Machines/About Virtual Machines.md",
"Coding Tips (Classical)/Terminal Tips/Servers/Virtual Machines/Connect to a VirtualBox VM desktop remotely.md",
"Coding Tips (Classical)/Terminal Tips/Servers/About Servers.md",
@ -221,16 +229,9 @@
"Coding Tips (Classical)/Project Vault/Obsidian/Obsidian Guides/Obsidian-net process.md",
"Machine Tips (Quantum)/Physics/Hardware/MicroControllers/Arduino.md",
"Coding Tips (Classical)/Terminal Tips/CLI Tools/Networking/Protocols/APIs/Useful APIs.md",
"Machine Tips (Quantum)/Resources/Quantum 101 - Alt. Resources.md",
"Machine Tips (Quantum)/Math/Algorithms/Encryption/Encryption Software.md",
"Machine Tips (Quantum)/Resources/Welcome to Quantum 101.md",
"Machine Tips (Quantum)/Quantum spaces.canvas",
"Coding Tips (Classical)/Project Vault/Obsidian/imgFiles/Pasted image 20230817142703.png",
"Coding Tips (Classical)/Webpage/Resume-ish - my occupations.md",
"Coding Tips (Classical)/Project Vault/Obsidian/Obsidian Guides/Digital Garden Plugin.md",
"Coding Tips (Classical)/Project Vault/Obsidian/imgFiles/Pasted image 20230817143911.png",
"Coding Tips (Classical)/Terminal Tips/About terminal.md",
"Machine Tips (Quantum)/Resources/Technologies, Orgs, & Apps/Intro to Quantum Technologies.md",
"Coding Tips (Classical)/Project Vault/Obsidian/imgFiles/Pasted image 20230817040651.png",
"Coding Tips (Classical)/Project Vault/Obsidian/imgFiles/Pasted image 20230816174402.png",
"Coding Tips (Classical)/Project Vault/Obsidian/imgFiles/Pasted image 20230816173235.png",

View File

@ -72,3 +72,10 @@ We start by defining the document-class
But you may be better off editing a document simply through [Overleaf](https://www.overleaf.com/project/6306feb35a99fd317a79ec3a) as well.
![[Pasted image 20220825004820.png]]
## Latex Cheatsheet:
---
- use `\` for spaces if not already handles
- for the Obsidian plugin use `$$` to enable
- for multi-integer exponentiation use `a^{34 + 65}`

View File

@ -0,0 +1,44 @@
$$16^{54} \ mod \ 17=3^{24×54} \ mod \ 17 $$
Why?
[Public Key Cryptography: Diffie-Hellman Key Exchange (short version) - YouTube](https://www.youtube.com/watch?v=3QnD2c4Xovk) is a good video to understand asymmetric cryptography. There is a jump from 4:34 in the video that is not obvious to everyone.
The jump is from 1654mod17 to 324×54mod17, but why? From the comments of video, Im not the only one who is supprised by this jump.
First let me introduce a formula:
$$a^b\ mod \ p=((a \ mod \ p)^b) \ mod \ p \ \ \ \ (1)$$
Then the proof:
There must be one integer `n` to have
$$a \ mod \ p=anp \ \ \ \ (2)$$
so
$$((a \ mod \ p)^b) \ mod \ p=((anp)^b) \ mod \ p$$
With [Binomial theorem - Wikipedia](https://en.wikipedia.org/wiki/Binomial_theorem),
$$(anp)b=ab+(b1)ab1(np)+(b2)ab2(np)2+...+(np)b$$
We could see that all items are times of `p` except $a^b$,
$$((anp)bmodp)=(ab+(b1)ab1(np)+(b2)ab2(np)2+...+(np)b)modp=abmodp+0+0+...+0$$
Now we got
$$((anp)^b \ mod \ p)=a^b \ mod \ p$$
Use formula (2)
$$((amodp)b)modp=abmodp$$
Now let a as $3^{24}$, and b as 54 in formula (1):
$$3^{24×54}\ mod \ 17=((3^{24})^{54}) \ mod \ 17=((324mod17)54)mod17=1654mod17$$