Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move go-libp2p-noise here #1462

Merged
merged 149 commits into from
Apr 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
27919d2
begin protocol, handshake, change XX.noise.go to export stuff
noot Aug 23, 2019
dd1d543
add XX test
noot Aug 23, 2019
49e1855
begin xx handshake test
noot Aug 23, 2019
7d68b94
finish xx handshake test
noot Aug 23, 2019
9389119
append noise key to signed payload
noot Aug 23, 2019
71e20a6
remove payload in stage 2, add todo
noot Aug 23, 2019
83c3fcb
fix spacing
noot Aug 23, 2019
58b207f
add encode and decoding funcs for MessageBuffer
noot Aug 23, 2019
64590b0
initial XX handshake done
noot Aug 23, 2019
304f202
handshake test for xx passes
noot Aug 24, 2019
763a7ef
marshal and unmarshal remote pubkey from payload ok
noot Aug 24, 2019
0239517
remove unneeded payload data, check and set remote pubkeys
noot Aug 24, 2019
7d29cd1
add verification of payload
noot Aug 24, 2019
dd04220
update IK to export needed types
noot Aug 24, 2019
4fc0d08
add length rw to XX messages
noot Aug 24, 2019
736a9fa
separate handshakes into files
noot Aug 24, 2019
7823ac9
add static key to Transport
noot Aug 24, 2019
5c2c243
ik functional w/ fallback from xx to ik
noot Aug 24, 2019
42481be
add encrypt/decrypt message tests to XX
noot Aug 24, 2019
fe54e1c
add encrypt and decrypt funcs
noot Aug 24, 2019
443240d
add secure read/writes
noot Aug 24, 2019
50b1870
wip XXfallback
noot Aug 24, 2019
f7e9a08
add IK test
noot Aug 24, 2019
2de16d0
begin work on moving ephemeral key from ik->xx
noot Aug 24, 2019
7c6510e
ephemeral keys passed from ik->xxfallback
noot Aug 24, 2019
f3c6167
ik->kkfallback complete
noot Aug 24, 2019
e40f6b2
use ipfs/go-log
noot Aug 24, 2019
c01c852
cleanup code
noot Aug 24, 2019
a1ca411
fix ReadSecure and WriteSecure
noot Aug 24, 2019
2a8a2cb
clean up
noot Aug 24, 2019
b7d0e5b
remove c.out
noot Aug 24, 2019
45182a4
cleanup code (#3)
noot Aug 24, 2019
85a35c0
send payload from initiator in XX last message
noot Aug 24, 2019
dece795
remove unneeded files
noot Aug 24, 2019
048274e
improve secureSession Read
noot Aug 25, 2019
5897e49
presentation (#5)
wildmolasses Aug 25, 2019
abb6b8b
Merge branch 'master' into begin-noise
ansermino Aug 25, 2019
7df7e33
fix if statement in runHandshake, clean up code
noot Aug 25, 2019
ce16998
remove unneeded files
noot Aug 25, 2019
aad1bf2
Merge branch 'begin-noise' of github.com:ChainSafe/go-libp2p-noise in…
noot Aug 25, 2019
382b758
add rw lock, streams functioning
noot Aug 26, 2019
062c1b5
move keypair generation to constructors, add xxfallback integration test
noot Aug 26, 2019
618ebb8
fix ik/xx logic, add more tests for ik
noot Aug 26, 2019
edc89c2
improve log formatting
noot Aug 26, 2019
ba7b4e5
improve log formatting
noot Aug 27, 2019
ace277e
change xx name string from blake2s to sha256
noot Nov 4, 2019
c64dd2c
fix initiator / responder roles in test setup
yusefnapora Dec 4, 2019
a7d5094
check right handshake is used in noise pipes tests
yusefnapora Dec 4, 2019
ca9fa6c
use correct message decoder in XXfallback
yusefnapora Dec 4, 2019
fdf4c44
use Errorf instead of Error
yusefnapora Dec 4, 2019
0a75717
fix hash function in Noise protocol name
yusefnapora Dec 4, 2019
423803f
fix conditional for whether to use IK
yusefnapora Dec 4, 2019
c3157aa
only set ik_complete = true if IK succeeds
yusefnapora Dec 4, 2019
84d5b55
add test for large plaintext payloads
yusefnapora Dec 5, 2019
e9237a8
split large plaintexts into chunks
yusefnapora Dec 5, 2019
8f13aa4
Merge pull request #9 from libp2p/fix/noise-pipes
yusefnapora Dec 6, 2019
e360301
Merge pull request #10 from libp2p/feat/message-chunking
yusefnapora Dec 6, 2019
1d0d036
rename imports from ChainSafe to libp2p org
yusefnapora Dec 6, 2019
b72caed
guard static key cache with mutex
yusefnapora Dec 6, 2019
8349e50
fix protocol id string
yusefnapora Dec 11, 2019
30b7a7d
Merge pull request #27 from libp2p/fix/protocol-id
yusefnapora Dec 11, 2019
ca63ecd
use Options to configure transport
yusefnapora Dec 11, 2019
8ab00e7
rename constructors
yusefnapora Dec 11, 2019
fc5d113
Merge pull request #17 from libp2p/feat/transport-options
yusefnapora Dec 11, 2019
c67695a
don't swallow errors from rand.Read
yusefnapora Dec 12, 2019
8a5063a
rm redundant check for num bytes read
yusefnapora Dec 12, 2019
8feb08c
Merge pull request #28 from libp2p/fix/handle-keygen-errors
yusefnapora Dec 12, 2019
f360c66
move Keypair to its own file
yusefnapora Dec 12, 2019
ff835a9
camelCase field names
yusefnapora Dec 12, 2019
eb5f403
make Transport and config fields private
yusefnapora Dec 12, 2019
192f8eb
derive session params from Transport
yusefnapora Dec 12, 2019
e616482
use empty prologue
yusefnapora Jan 11, 2020
d0ed06d
add Makefile for generating protobuf code
yusefnapora Jan 20, 2020
a82be49
rename protobuf fields
yusefnapora Jan 20, 2020
a57e711
Merge pull request #36 from libp2p/proto-field-rename
yusefnapora Jan 29, 2020
8c00111
fix protocol id in integration test
yusefnapora Jan 28, 2020
297dd7f
send much more data in integration test
yusefnapora Jan 29, 2020
7df3fe5
make sure we fill buffer when reading from conn
yusefnapora Jan 29, 2020
3971c24
Merge pull request #38 from libp2p/fix/stream-reset
yusefnapora Jan 29, 2020
268e9e2
use io.ReadFull instead of custom helper
yusefnapora Jan 29, 2020
a1e6857
Merge pull request #39 from libp2p/fix/cleanup
yusefnapora Jan 29, 2020
8b7f580
don't log all errors
yusefnapora Feb 3, 2020
4d60c61
rm debug logs
yusefnapora Feb 3, 2020
9f6c7d6
fix peer ID check in IK handshake
yusefnapora Feb 3, 2020
7aa7066
add test for peer id mismatch
yusefnapora Feb 3, 2020
2f38053
remove noise pipes & associated code
yusefnapora Feb 28, 2020
9df4fe6
cleanup
yusefnapora Feb 28, 2020
1bdb5d3
test crypto error cases
yusefnapora Feb 28, 2020
4d642f6
fix EOF handling in Read
yusefnapora Mar 2, 2020
5d2c414
add benchmark tests
yusefnapora Mar 2, 2020
b152f9d
replace noise explorer with flynn/noise
yusefnapora Mar 2, 2020
6e4c6b8
move static keygen to session
yusefnapora Mar 2, 2020
70efae2
refactor internal session state
yusefnapora Mar 2, 2020
5974ecc
factor out processing remote handshake payload
yusefnapora Mar 2, 2020
db01d6a
cleanup
yusefnapora Mar 2, 2020
1edb96a
make crypto methods private
yusefnapora Mar 2, 2020
dd7ccf8
make handshake state local to runHandshake
yusefnapora Mar 3, 2020
370abe0
rm dead code
yusefnapora Mar 3, 2020
7a756b9
Merge pull request #56 from libp2p/refactor/flynn
yusefnapora Mar 3, 2020
fac8488
remove ETHBerlin pdf.
raulk Mar 4, 2020
c242789
wrap errors.
raulk Apr 23, 2020
1ecc08a
refine comments.
raulk Apr 23, 2020
ef4c422
propagate context deadlines to handshake.
raulk Apr 23, 2020
4dad9a3
bench: reset timer + report allocs.
raulk Apr 23, 2020
803b648
make Read conform to io.Reader behaviour + performance opt.
raulk Apr 23, 2020
99a65b7
improve comments and readability.
raulk Apr 23, 2020
6b2b872
stage writes in a buffer; write at once on the transport.
raulk Apr 24, 2020
0efbf73
stop tracking qrem in state; simplify q logic.
raulk Apr 24, 2020
457b94d
revert deadline iff it could actually be set.
raulk Apr 24, 2020
40f0c0f
decrypt in place.
raulk Apr 24, 2020
7b52f52
rename param.
raulk Apr 24, 2020
b514672
minor nits.
raulk Apr 24, 2020
9b9c06f
Merge pull request #58 from libp2p/raul-review
raulk Apr 24, 2020
6278b74
context cancellation and zero alloc reads
aarshkshah1992 Apr 28, 2020
0176819
optimize reads
aarshkshah1992 Apr 28, 2020
9ffff12
better docs
aarshkshah1992 Apr 28, 2020
8dc828f
better benchmarking
aarshkshah1992 Apr 28, 2020
dba16dd
remove extra write but no abstraction
aarshkshah1992 Apr 28, 2020
e4dcb0d
improved benchmark tests
aarshkshah1992 Apr 29, 2020
4cca386
improved benchmark naming
aarshkshah1992 Apr 29, 2020
1c8319d
better benchmark tests
aarshkshah1992 Apr 29, 2020
5d22361
benchmark till 62KB writes
aarshkshah1992 Apr 29, 2020
9f9e631
remove alloc from benchmark
aarshkshah1992 Apr 29, 2020
d975863
more unit tests
aarshkshah1992 Apr 29, 2020
e99d5b6
pre-calculate handshake message len
aarshkshah1992 Apr 29, 2020
47797a5
changes as per review
aarshkshah1992 May 4, 2020
68f0604
changes as per review
aarshkshah1992 May 7, 2020
64edfa6
test read decryption fails
aarshkshah1992 May 7, 2020
b5990bd
Merge pull request #81 from libp2p/feat/77
aarshkshah1992 May 7, 2020
86b4893
optimize: reduce syscalls using a buffered reader.
raulk Oct 6, 2020
a27e362
chore: relicense MIT/Apache-2.0
Stebalien Mar 25, 2021
5f829ba
Merge pull request #93 from libp2p/chore/re-license
Stebalien Mar 30, 2021
65ff13b
chore: update deps
Stebalien Mar 30, 2021
1ec5036
Merge pull request #94 from libp2p/chore/update
Stebalien Mar 30, 2021
f4be0fe
chore: update github.com/flynn/noise to v1
titanous Apr 22, 2021
f046ec6
fix staticcheck
marten-seemann Apr 23, 2021
5ee5b95
add a comment why we ignore the payload on the first message
marten-seemann May 5, 2021
87420da
Merge pull request #96 from libp2p/fix-staticcheck
Stebalien May 5, 2021
9832fde
Merge pull request #95 from titanous/update-noise
Stebalien May 5, 2021
061a86e
fix: remove deprecated call to pk.Bytes
Stebalien Jul 22, 2021
ef07216
Merge pull request #99 from libp2p/fix/deprecations
Stebalien Jul 22, 2021
4bd2ad6
update go-libp2p-core, remove integration test
marten-seemann Jul 25, 2021
123a116
Merge pull request #102 from libp2p/update-core
Stebalien Jul 25, 2021
a05bdd7
add the peer ID to SecureInbound
marten-seemann Sep 5, 2021
72fe0a0
Merge pull request #104 from libp2p/check-peer-id-on-inbound
marten-seemann Sep 8, 2021
abde8f3
catch panics during the handshake (#111)
marten-seemann Apr 19, 2022
1c9854f
move go-libp2p-noise here
marten-seemann Apr 26, 2022
9359057
switch from github.com/libp2p/go-libp2p-noise to p2p/security/noise
marten-seemann Apr 26, 2022
04b43c8
noise: use golang.org/x/crypto/chacha20poly1305 instead of golang.org…
marten-seemann Apr 27, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import (

"github.com/libp2p/go-libp2p/p2p/muxer/yamux"
"github.com/libp2p/go-libp2p/p2p/net/connmgr"
"github.com/libp2p/go-libp2p/p2p/security/noise"
quic "github.com/libp2p/go-libp2p/p2p/transport/quic"
"github.com/libp2p/go-libp2p/p2p/transport/tcp"
ws "github.com/libp2p/go-libp2p/p2p/transport/websocket"

"github.com/libp2p/go-libp2p-core/crypto"

noise "github.com/libp2p/go-libp2p-noise"
"github.com/libp2p/go-libp2p-peerstore/pstoremem"
rcmgr "github.com/libp2p/go-libp2p-resource-manager"
tls "github.com/libp2p/go-libp2p-tls"
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ go 1.17

require (
github.com/benbjohnson/clock v1.3.0
github.com/flynn/noise v1.0.0
github.com/gogo/protobuf v1.3.2
github.com/golang/mock v1.6.0
github.com/google/gopacket v1.1.19
Expand All @@ -20,7 +21,6 @@ require (
github.com/libp2p/go-libp2p-circuit v0.6.0
github.com/libp2p/go-libp2p-core v0.15.1
github.com/libp2p/go-libp2p-nat v0.1.0
github.com/libp2p/go-libp2p-noise v0.4.0
github.com/libp2p/go-libp2p-peerstore v0.6.0
github.com/libp2p/go-libp2p-resource-manager v0.2.1
github.com/libp2p/go-libp2p-testing v0.9.2
Expand Down Expand Up @@ -65,7 +65,6 @@ require (
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/elastic/gosigar v0.14.2 // indirect
github.com/flynn/noise v1.0.0 // indirect
github.com/francoispqt/gojay v1.2.13 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
Expand Down
4 changes: 0 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,10 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB
github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g=
github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI=
github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ=
github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94=
github.com/btcsuite/btcd v0.22.0-beta h1:LTDpDKUM5EeOFBPM8IXpinEcmZ6FWfNZbE3lfrfdnWo=
github.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA=
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts=
github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o=
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg=
github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY=
Expand Down Expand Up @@ -447,8 +445,6 @@ github.com/libp2p/go-libp2p-mplex v0.5.0 h1:vt3k4E4HSND9XH4Z8rUpacPJFSAgLOv6HDvG
github.com/libp2p/go-libp2p-mplex v0.5.0/go.mod h1:eLImPJLkj3iG5t5lq68w3Vm5NAQ5BcKwrrb2VmOYb3M=
github.com/libp2p/go-libp2p-nat v0.1.0 h1:vigUi2MEN+fwghe5ijpScxtbbDz+L/6y8XwlzYOJgSY=
github.com/libp2p/go-libp2p-nat v0.1.0/go.mod h1:DQzAG+QbDYjN1/C3B6vXucLtz3u9rEonLVPtZVzQqks=
github.com/libp2p/go-libp2p-noise v0.4.0 h1:khcMsGhHNdGqKE5LDLrnHwZvdGVMsrnD4GTkTWkwmLU=
github.com/libp2p/go-libp2p-noise v0.4.0/go.mod h1:BzzY5pyzCYSyJbQy9oD8z5oP2idsafjt4/X42h9DjZU=
github.com/libp2p/go-libp2p-peerstore v0.4.0/go.mod h1:rDJUFyzEWPpXpEwywkcTYYzDHlwza8riYMaUzaN6hX0=
github.com/libp2p/go-libp2p-peerstore v0.6.0 h1:HJminhQSGISBIRb93N6WK3t6Fa8OOTnHd/VBjL4mY5A=
github.com/libp2p/go-libp2p-peerstore v0.6.0/go.mod h1:DGEmKdXrcYpK9Jha3sS7MhqYdInxJy84bIPtSu65bKc=
Expand Down
229 changes: 229 additions & 0 deletions p2p/security/noise/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
The contents of this repository are Copyright (c) corresponding authors and
contributors, licensed under the `Permissive License Stack` meaning either of:

- Apache-2.0 Software License: https://www.apache.org/licenses/LICENSE-2.0
([...4tr2kfsq](https://gateway.ipfs.io/ipfs/bafkreiankqxazcae4onkp436wag2lj3ccso4nawxqkkfckd6cg4tr2kfsq))

- MIT Software License: https://opensource.org/licenses/MIT
([...vljevcba](https://gateway.ipfs.io/ipfs/bafkreiepofszg4gfe2gzuhojmksgemsub2h4uy2gewdnr35kswvljevcba))

You may not use the contents of this repository except in compliance
with one of the listed Licenses. For an extended clarification of the
intent behind the choice of Licensing please refer to
https://protocol.ai/blog/announcing-the-permissive-license-stack/

Unless required by applicable law or agreed to in writing, software
distributed under the terms listed in this notice is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See each License for the specific language
governing permissions and limitations under that License.

<!--- SPDX-License-Identifier: Apache-2.0 OR MIT -->
`SPDX-License-Identifier: Apache-2.0 OR MIT`

Verbatim copies of both licenses are included below:

<details><summary>Apache-2.0 Software License</summary>

```
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS
```
</details>

<details><summary>MIT Software License</summary>

```
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
```
</details>
Loading