31 Commits

Author SHA1 Message Date
Guillaume Ballet
d0ddeacf81 whisper/whisperv5: set filter SymKeyHash on creation (#15165) 2017-10-06 16:04:21 +02:00
Noman
1d5bc1cafe whisper: Fix spelling and grammar in error (#15009)
* whisper: Fix spelling and grammar in error

* whisper: Fix grammar in comments
2017-08-21 12:22:00 +03:00
Egon Elbre
2e85335dde whisper: fix megacheck warnings (#14925)
* whisper: fix megacheck warnings

* whisper/whisperv5: regenerate json codec to fix unused override type
2017-08-08 14:48:06 +03:00
Bas van Kervel
775a5efeb3 whisper: renamed Info#Message to Info#Messages 2017-06-23 09:18:02 +02:00
Bas van Kervel
604499a627 whisper: use hexutil.UnmarshalFixedText for topic parsing 2017-06-21 12:58:00 +02:00
Bas van Kervel
5b14175f89 whisper: use syncmap for dynamic configuration options 2017-06-21 11:15:47 +02:00
Bas van Kervel
c4cef83e3a whisper: move flags from whisper package to utils 2017-06-21 10:49:14 +02:00
Bas van Kervel
f784df7c71 whisper: renamed errors 2017-06-21 10:32:36 +02:00
Bas van Kervel
4132c73cd2 whisper: fallback to default config if none is specified 2017-06-21 10:24:34 +02:00
Bas van Kervel
dcd18b06a6 whisper: remove obsolete api tests 2017-06-21 10:23:45 +02:00
Bas van Kervel
f29e9e3a53 whisper: remove gencodec override for config 2017-06-21 10:11:54 +02:00
Bas van Kervel
96ba0d82dc whisper: move ShhClient to its own package 2017-06-21 10:11:46 +02:00
Bas van Kervel
0eb1c12997 whisperv5: integrate whisper and add whisper RPC simulator 2017-06-15 11:53:15 +02:00
gluk256
00426d7b47 whisper: switching to v5 + minor refactoring (#14387) 2017-04-28 11:57:15 +02:00
gluk256
e7bc0f0be5 whisper: message format refactoring (#14335)
* whisper: salt removed from AES encryption
* whisper: padding format updated
* whisper: padding test added
* whisper: padding refactored, tests fixed
* whisper: padding test updated
* whisper: wnode bugfix
* whisper: send/receive protocol updated
* whisper: minor update
* whisper: bugfix in test
* whisper: updated parameter names and comments
* whisper: functions renamed
* whisper: minor refactoring
2017-04-26 21:05:48 +02:00
gluk256
1a04eb6973 whisper: big refactoring (#13852)
* whisper: GetMessages fixed; size restriction updated
* whisper: made PoW and MaxMsgSize customizable
* whisper: test added
* whisper: sym key management changed
* whisper: identity management refactored
* whisper: API refactoring (Post and Filter)
* whisper: big refactoring complete
* whisper: spelling fix
* whisper: variable topic size allowed for a filter
* whisper: final update
* whisper: formatting
* whisper: file exchange introduced in wnode
* whisper: bugfix
* whisper: API updated + new tests
* whisper: statistics updated
* whisper: wnode server updated
* whisper: allowed filtering for variable topic size
* whisper: tests added
* whisper: resolving merge conflicts
* whisper: refactoring (documenting mostly)
* whsiper: tests fixed
* whisper: down cased error messages
* whisper: documenting the API functions
* whisper: logging fixed
* whisper: fixed wnode parameters
* whisper: logs fixed (typos)
2017-04-09 23:49:22 +02:00
Felix Lange
ed93d786f2 trie, whisper/whisperv5: use math/rand Read function 2017-03-22 20:49:15 +01:00
Felix Lange
845058386d common: move big integer math to common/math (#3699)
* common: remove CurrencyToString

Move denomination values to params instead.

* common: delete dead code

* common: move big integer operations to common/math

This commit consolidates all big integer operations into common/math and
adds tests and documentation.

There should be no change in semantics for BigPow, BigMin, BigMax, S256,
U256, Exp and their behaviour is now locked in by tests.

The BigD, BytesToBig and Bytes2Big functions don't provide additional
value, all uses are replaced by new(big.Int).SetBytes().

BigToBytes is now called PaddedBigBytes, its minimum output size
parameter is now specified as the number of bytes instead of bits. The
single use of this function is in the EVM's MSTORE instruction.

Big and String2Big are replaced by ParseBig, which is slightly stricter.
It previously accepted leading zeros for hexadecimal inputs but treated
decimal inputs as octal if a leading zero digit was present.

ParseUint64 is used in places where String2Big was used to decode a
uint64.

The new functions MustParseBig and MustParseUint64 are now used in many
places where parsing errors were previously ignored.

* common: delete unused big integer variables

* accounts/abi: replace uses of BytesToBig with use of encoding/binary

* common: remove BytesToBig

* common: remove Bytes2Big

* common: remove BigTrue

* cmd/utils: add BigFlag and use it for error-checked integer flags

While here, remove environment variable processing for DirectoryFlag
because we don't use it.

* core: add missing error checks in genesis block parser

* common: remove String2Big

* cmd/evm: use utils.BigFlag

* common/math: check for 256 bit overflow in ParseBig

This is supposed to prevent silent overflow/truncation of values in the
genesis block JSON. Without this check, a genesis block that set a
balance larger than 256 bits would lead to weird behaviour in the VM.

* cmd/utils: fixup import
2017-02-26 22:21:51 +01:00
gluk256
5a673a9463 whisper: expiry refactoring (#3706) 2017-02-23 18:46:32 +01:00
Péter Szilágyi
14b8219f93 all: blidly swap out glog to our log15, logs need rework 2017-02-23 12:16:44 +02:00
gluk256
eefc5f70ce Whisper API fixed (#3687)
* whisper: wnode updated for tests with geth

* whisper: updated processing of incoming messages

* whisper: symmetric encryption updated

* whisper: filter id type changed to enhance security

* whisper: allow filter without topic for asymmetric encryption

* whisper: POW updated

* whisper: logging updated

* whisper: spellchecker update

* whisper: error handling changed

* whisper: JSON field names fixed
2017-02-23 09:41:47 +01:00
Felix Lange
822dddd17e crypto: add btcec fallback for sign/recover without cgo (#3680)
* vendor: add github.com/btcsuite/btcd/btcec

* crypto: add btcec fallback for sign/recover without cgo

This commit adds a non-cgo fallback implementation of secp256k1
operations.

* crypto, core/vm: remove wrappers for sha256, ripemd160
2017-02-18 09:24:12 +01:00
gluk256
300d48a6b7 whisper: interface changed to simplify the transition to v5
* whisper: mailserver test introduced, refactoring

* whisper: validation test updated

* whisper: max number of peers fixed

* whisper: verification bug fixed

* whisper: esthetic fix

* whisper: interface changed to simplify the transition to v5

* whisper: preparation for version switch
2017-02-14 16:44:47 +02:00
gluk256
897cd4e6e2 cmd/wnode, whisper: add whisper CLI tool and mail server (#3580) 2017-01-31 11:16:20 +01:00
Felix Lange
9695d6c2be all: fix ineffectual assignments and remove uses of crypto.Sha3
go get github.com/gordonklaus/ineffassign
ineffassign .
2017-01-09 16:24:42 +01:00
Péter Szilágyi
a390eb6fc8 all: fix spelling errors 2017-01-06 19:44:35 +02:00
Felix Lange
bd6c050a25 all: fix issues reported by honnef.co/go/simple/cmd/gosimple 2017-01-06 18:18:07 +01:00
Felix Lange
473f9a9571 all: gofmt -w -s 2017-01-06 15:52:03 +01:00
gluk256
c6839d7cef whisper: refactoring (#3411)
* whisper: refactored message processing
* whisper: final polishing
* whisper: logging updated
* whisper: moved the check, changed the default PoW
* whisper: refactoring of message queuing
* whisper: refactored parameters
2016-12-20 00:58:01 +01:00
gluk256
d7cfc042e6 whisper/shhapi, whisper/whisperv5: refactoring (#3364)
* Filter refactoring
* API tests added + bugfix
* fixed the error logs
* FilterID fixed
* test cases fixed
* key generation updated
* POW updated
* got rid of redundant stuff
2016-12-01 20:09:22 +01:00
gluk256
9ec4c40b57 whisper: project restructured, version 5 introduced (#3022)
whisper: project restructured, version 5 introduced

This commits adds a draft version of the new shh v5 protocol.
The new version is not on by default, --shh still selects version 2.
2016-10-29 14:11:37 +02:00