-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9d30c24
commit b56aaaf
Showing
8 changed files
with
586 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import { Tab } from "./Tab"; | ||
import {Text} from "./Text"; | ||
import {TabOptions} from "../pages"; | ||
import {styled} from "styled-components"; | ||
import Image from 'next/image' | ||
|
||
export function HowTo({ isActive, setActiveTab }: { | ||
setActiveTab?: (el: TabOptions) => void | ||
isActive: boolean | ||
}) { | ||
|
||
return ( | ||
<Tab isActive={isActive}> | ||
<HowToWrapper> | ||
<Text> | ||
This project works with asymmetric cryptography to encrypt and decrypt messages. | ||
</Text> | ||
<Text> | ||
Encryption is a feature of asymmetric cryptography that allows us to share PRIVATE messages between known parties. Private messages, in this context, are messages no one else than the recipient should see. | ||
</Text> | ||
<Text> | ||
If I want to send a private message to a friend, and only for him to see that message, then I will encrypt it with his public key, and he will be able to decrypt it with his private key. | ||
</Text> | ||
<Text> | ||
The process goes as follows: | ||
</Text> | ||
<TextList> | ||
<Text>1. Purple shares her public key with Green.</Text> | ||
<Text>2. Green encrypts a message with Purple's public key.</Text> | ||
<Text>3. Green sends the encrypted message to Purple.</Text> | ||
<Text>4. Purple uses her private key to decrypt Green's message.</Text> | ||
</TextList> | ||
|
||
<PostImage src={'/assets/svg/asymmetric-cryptography.svg'} | ||
alt={'Asymmetric cryptography explained graphically!'} | ||
priority | ||
width={450} | ||
height={350} | ||
/> | ||
|
||
<Text> | ||
This process is only used to share information that should not be public (it is masked behind an encryption), and no one but the person who has the message and then one that received the message can see it otherwise. | ||
</Text> | ||
</HowToWrapper> | ||
</Tab> | ||
); | ||
} | ||
|
||
const HowToWrapper = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
gap: 10px; | ||
width: 100%; | ||
p { | ||
text-align: justify; | ||
width: 100%; | ||
} | ||
` | ||
|
||
const TextList = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
` | ||
|
||
const PostImage = styled(Image)` | ||
margin: -30px 0; | ||
` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,41 @@ | ||
import styled from "styled-components"; | ||
|
||
export const Text = styled.p` | ||
text-align: center; | ||
text-align: center; | ||
line-height: 1.4; | ||
color:white; | ||
color: white; | ||
margin-block-start: 0; | ||
margin-block-end: 0; | ||
&:hover { | ||
color: #eaeaea; | ||
font-weight: bold; | ||
} | ||
` | ||
|
||
export const BoldText = styled.p` | ||
text-align: center; | ||
font-weight: 900; | ||
color:white; | ||
margin-block-start: 0; | ||
margin-block-end: 0; | ||
` | ||
|
||
export const TextRed = styled.p` | ||
color: red; | ||
margin-block-start: 0; | ||
margin-block-end: 0; | ||
`; | ||
|
||
export const LinkText = styled.span` | ||
text-align: center; | ||
line-height: 1.4; | ||
text-decoration: underline; | ||
color:white; | ||
margin-block-start: 0; | ||
margin-block-end: 0; | ||
&:hover { | ||
color: rgb(42, 196, 231); | ||
cursor: pointer !important; | ||
} | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.