Skip to content

Commit b3b27cd

Browse files
authored
Fix typos (#266)
* Fix typos * Fix pylint e501
1 parent 357fb84 commit b3b27cd

File tree

6 files changed

+27
-28
lines changed

6 files changed

+27
-28
lines changed

NEWS

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Performance:
6363
single-shot verify (i.e. without precomputation) by about 4 to 5%.
6464
* Use native Python 3.8 support for calculating multiplicative inverses.
6565

66-
Maintenace:
66+
Maintenance:
6767
* Include Python 3.9 in PyPI keywords.
6868
* More realistic branch coverage counting (ignore Python version-specific
6969
branches).

README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
This is an easy-to-use implementation of ECC (Elliptic Curve Cryptography)
1313
with support for ECDSA (Elliptic Curve Digital Signature Algorithm) and ECDH
1414
(Elliptic Curve Diffie-Hellman), implemented purely in Python, released under
15-
the MIT license. With this library, you can quickly create keypairs (signing
15+
the MIT license. With this library, you can quickly create key pairs (signing
1616
key and verifying key), sign messages, and verify the signatures. You can
1717
also agree on a shared secret key based on exchanged public keys.
1818
The keys and signatures are very short, making them easy to handle and
@@ -75,7 +75,7 @@ pip install ecdsa[gmpy]
7575

7676
## Speed
7777

78-
The following table shows how long this library takes to generate keypairs
78+
The following table shows how long this library takes to generate key pairs
7979
(`keygen`), to sign data (`sign`), to verify those signatures (`verify`),
8080
to derive a shared secret (`ecdh`), and
8181
to verify the signatures with no key-specific precomputation (`no PC verify`).
@@ -257,14 +257,14 @@ interoperability testing and as a teaching tool.
257257

258258
**This library does not protect against side-channel attacks.**
259259

260-
Do not allow attackers to measure how long it takes you to generate a keypair
260+
Do not allow attackers to measure how long it takes you to generate a key pair
261261
or sign a message. Do not allow attackers to run code on the same physical
262-
machine when keypair generation or signing is taking place (this includes
262+
machine when key pair generation or signing is taking place (this includes
263263
virtual machines). Do not allow attackers to measure how much power your
264-
computer uses while generating the keypair or signing a message. Do not allow
264+
computer uses while generating the key pair or signing a message. Do not allow
265265
attackers to measure RF interference coming from your computer while generating
266-
a keypair or signing a message. Note: just loading the private key will cause
267-
keypair generation. Other operations or attack vectors may also be
266+
a key pair or signing a message. Note: just loading the private key will cause
267+
key pair generation. Other operations or attack vectors may also be
268268
vulnerable to attacks. **For a sophisticated attacker observing just one
269269
operation with a private key will be sufficient to completely
270270
reconstruct the private key**.
@@ -529,7 +529,7 @@ failures of the entropy source.
529529

530530
## Examples
531531

532-
Create a NIST192p keypair and immediately save both to disk:
532+
Create a NIST192p key pair and immediately save both to disk:
533533

534534
```python
535535
from ecdsa import SigningKey
@@ -572,7 +572,7 @@ except BadSignatureError:
572572
print "BAD SIGNATURE"
573573
```
574574

575-
Create a NIST521p keypair:
575+
Create a NIST521p key pair:
576576

577577
```python
578578
from ecdsa import SigningKey, NIST521p

src/ecdsa/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
296296
# TAG-NUM-gHEX
297297
mo = re.search(r"^(.+)-(\d+)-g([0-9a-f]+)$", git_describe)
298298
if not mo:
299-
# unparseable. Maybe git-describe is misbehaving?
299+
# unparsable. Maybe git-describe is misbehaving?
300300
pieces["error"] = (
301301
"unable to parse git-describe output: '%s'" % describe_out
302302
)

src/ecdsa/keys.py

+13-14
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,12 @@
5757
portable and cross-platform way.
5858
5959
bytes-like object
60-
All the types that implement the buffer protocol. That includes
61-
``str`` (only on python2), ``bytes``, ``bytesarray``, ``array.array`
62-
and ``memoryview`` of those objects.
63-
Please note that ``array.array` serialisation (converting it to byte
64-
string) is endianess dependant! Signature computed over ``array.array``
65-
of integers on a big-endian system will not be verified on a
66-
little-endian system and vice-versa.
60+
All the types that implement the buffer protocol. That includes ``str``
61+
(only on python2), ``bytes``, ``bytesarray``, ``array.array` and
62+
``memoryview`` of those objects. Please note that ``array.array`
63+
serialisation (converting it to byte string) is endianness dependent!
64+
Signature computed over ``array.array`` of integers on a big-endian
65+
system will not be verified on a little-endian system and vice-versa.
6766
6867
set-like object
6968
All the types that support the ``in`` operator, like ``list``,
@@ -455,7 +454,7 @@ def from_der(
455454
curve = Ed448
456455
point_str, empty = der.remove_bitstring(point_str_bitstring, 0)
457456
if empty:
458-
raise der.UnexpectedDER("trailing junk afer public key")
457+
raise der.UnexpectedDER("trailing junk after public key")
459458
return cls.from_string(point_str, curve, None)
460459
if not oid_pk == oid_ecPublicKey:
461460
raise der.UnexpectedDER(
@@ -701,7 +700,7 @@ def verify(
701700
as the `sigdecode` parameter.
702701
703702
:param signature: encoding of the signature
704-
:type signature: sigdecode method dependant
703+
:type signature: sigdecode method dependent
705704
:param data: data signed by the `signature`, will be hashed using
706705
`hashfunc`, if specified, or default hash function
707706
:type data: bytes like object
@@ -756,7 +755,7 @@ def verify_digest(
756755
as the `sigdecode` parameter.
757756
758757
:param signature: encoding of the signature
759-
:type signature: sigdecode method dependant
758+
:type signature: sigdecode method dependent
760759
:param digest: raw hash value that the signature authenticates.
761760
:type digest: bytes like object
762761
:param sigdecode: Callable to define the way the signature needs to
@@ -1397,7 +1396,7 @@ def sign_deterministic(
13971396
:type extra_entropy: bytes like object
13981397
13991398
:return: encoded signature over `data`
1400-
:rtype: bytes or sigencode function dependant type
1399+
:rtype: bytes or sigencode function dependent type
14011400
"""
14021401
hashfunc = hashfunc or self.default_hashfunc
14031402
data = normalise_bytes(data)
@@ -1458,7 +1457,7 @@ def sign_digest_deterministic(
14581457
SHA-384 output using NIST256p or in similar situations.
14591458
14601459
:return: encoded signature for the `digest` hash
1461-
:rtype: bytes or sigencode function dependant type
1460+
:rtype: bytes or sigencode function dependent type
14621461
"""
14631462
if isinstance(self.curve.curve, CurveEdTw):
14641463
raise ValueError("Method unsupported for Edwards curves")
@@ -1559,7 +1558,7 @@ def sign(
15591558
:func:`~SigningKey.sign_deterministic` in such case.
15601559
15611560
:return: encoded signature of the hash of `data`
1562-
:rtype: bytes or sigencode function dependant type
1561+
:rtype: bytes or sigencode function dependent type
15631562
"""
15641563
hashfunc = hashfunc or self.default_hashfunc
15651564
data = normalise_bytes(data)
@@ -1613,7 +1612,7 @@ def sign_digest(
16131612
:func:`~SigningKey.sign_digest_deterministic` in such case.
16141613
16151614
:return: encoded signature for the `digest` hash
1616-
:rtype: bytes or sigencode function dependant type
1615+
:rtype: bytes or sigencode function dependent type
16171616
"""
16181617
if isinstance(self.curve.curve, CurveEdTw):
16191618
raise ValueError("Method unsupported for Edwards curves")

src/ecdsa/test_keys.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def test_parse_malfomed_eddsa_der_pubkey(self):
311311
with self.assertRaises(UnexpectedDER) as e:
312312
VerifyingKey.from_der(der_str)
313313

314-
self.assertIn("trailing junk afer public key", str(e.exception))
314+
self.assertIn("trailing junk after public key", str(e.exception))
315315

316316
def test_edwards_from_public_key_recovery(self):
317317
with self.assertRaises(ValueError) as e:

versioneer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
701701
# TAG-NUM-gHEX
702702
mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe)
703703
if not mo:
704-
# unparseable. Maybe git-describe is misbehaving?
704+
# unparsable. Maybe git-describe is misbehaving?
705705
pieces["error"] = ("unable to parse git-describe output: '%%s'"
706706
%% describe_out)
707707
return pieces
@@ -1110,7 +1110,7 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
11101110
# TAG-NUM-gHEX
11111111
mo = re.search(r"^(.+)-(\d+)-g([0-9a-f]+)$", git_describe)
11121112
if not mo:
1113-
# unparseable. Maybe git-describe is misbehaving?
1113+
# unparsable. Maybe git-describe is misbehaving?
11141114
pieces["error"] = (
11151115
"unable to parse git-describe output: '%s'" % describe_out
11161116
)

0 commit comments

Comments
 (0)