2019-07-17 19:03:20
how come scrypt?

Rotonen
2019-07-17 19:03:43
I like the tuning abilities

Fireduck
2019-07-17 19:03:47
but not really a big deal

Fireduck
2019-07-17 19:04:04
i'm not deep enough into the context, but litecoin miners are a thing

Rotonen
2019-07-17 19:04:10
a consideration?

Rotonen
2019-07-17 19:04:29
not a problem. It is mostly about just making it harder to crack the files, not impossible

Fireduck
2019-07-17 19:04:45
i'm assuming you're figuring out the key derivation cranking

Rotonen
2019-07-17 19:04:50
yeah

Fireduck
2019-07-17 19:05:11
My target is about 10 cpu seconds on modern systems

Fireduck
2019-07-17 19:06:11
do benchmark on a 9900K and on a ryzen 3600

Rotonen
2019-07-17 19:06:49
or with anything from the top ~10
https://www.cpubenchmark.net/singleThread.html Benchmarks of the single thread performance of CPUs. This chart comparing CPUs single thread performance is made using thousands of PerformanceTest benchmark results and is updated daily.

Rotonen
2019-07-17 19:09:12
my "unit" tests get slower and slower

Fireduck
2019-07-17 19:09:30
group them and run in parallel?

Rotonen
2019-07-17 19:09:52
or if they have proper setup/teardown isolation on all levels, just modulo-split them across cores

Rotonen
2019-07-17 19:10:05
as long as the entire suite takes less than 5 minutes, I'm not going to mess with it

Fireduck
2019-07-17 19:10:16
exceeding 5min is also my pain point

Rotonen
2019-07-17 19:10:18
bazel does each module separately

Fireduck
2019-07-17 19:10:22
10min requires immediate action

Rotonen
2019-07-17 19:10:36
currently at 60sec wall time

Fireduck
2019-07-17 19:10:42
kk, trivial

Rotonen
2019-07-17 19:55:45
*https://github.com/snowblossomcoin/snowblossom/compare/50a5799cafaa...2ec453651ea2*
https://github.com/snowblossomcoin/snowblossom/commit/2ec453651ea24271ff6ff8bee5fa276c5ddf884e - Based file encryption and decryption

GitHub
2019-07-17 19:57:32
@Rotonen please take a look at that. I'm pretty confident everything there is correct. Not using a good salt for the scrypt, but that is a necessary compromise to avoid redo the pbkdf for each file (on both reading and writing)

Fireduck
2019-07-17 19:58:03
who is lambdaworks?

Rotonen
2019-07-17 19:59:12
and i'm not deep enough into scrypt per implementation as to figure out if that parallelization cost is too little or too much

Rotonen
2019-07-17 20:00:24
That is fine

Fireduck
2019-07-17 20:01:07
Good question on lambdaworks. They have a java scrypt implementation (obviously) but don't know beyond that.

Fireduck
2019-07-17 20:01:47
if you see download stats and that indicates there are enough many eyeballs on them, should be legit

Rotonen
2019-07-17 20:02:43
they don't update a lot, which I take as a good sign. A small complete library doesn't need updates.

Fireduck
2019-07-17 20:03:01
is that init vector guaranteed sane?

Rotonen
2019-07-17 20:03:59
IV doesn't need to be anything in particular. It is best if you don't reuse it, since if you do someone will be able to compare files encrypted with the same key and see how much of the beginning of the file matches

Fireduck
2019-07-17 20:05:05
yes, it does not need to be anything in particular, but you're sure there is no such thing as a bad corner of the vector space random could spit up?

Rotonen
2019-07-17 20:05:19
i only suspect that as i've never actually looked into scrypt

Rotonen
2019-07-17 20:05:48
The IV is only used for the AES part

Fireduck
2019-07-17 20:06:24
kk

Rotonen
2019-07-17 20:08:45
mixing the return null error handling in there sorta irks me, but that's beside the point

Rotonen
2019-07-17 20:12:09
not spotting anything peculiar, but i'd not take that as a higher order guarantee

Rotonen
2019-07-17 20:14:02
sure

Fireduck
2019-07-17 20:14:25
lambdaworks seems like a relatively legit small scala company

Rotonen
2019-07-17 20:15:01
I do like that bazel makes you pin dependencies via hash

Fireduck
2019-07-17 20:15:18
so things can't change under you without some action

Fireduck
2019-07-17 20:16:11
lambdaworks is from northern serbia

Rotonen
2019-07-17 20:18:10
not as good as ukrainian, but I'll take it

Fireduck
2019-07-17 20:18:47
i'm more worried about that being so little used than their region of origin

Rotonen
2019-07-17 20:19:34
40 downloads recently, you're probably half of that already :stuck_out_tongue:

Rotonen
2019-07-17 20:19:53
oh, i've misestimated what usages means

Rotonen
2019-07-17 20:20:02
is bitcoinj legit?

Rotonen
2019-07-17 20:21:14
bitcoinj is legit

Fireduck
2019-07-17 20:21:26
and i'd be amazed if this is not a malware: https://mvnrepository.com/artifact/org.loois/android-sdk :smile:

Rotonen
2019-07-17 20:21:30
Mostly Mike Hearn before he got pissed off at the bitcoin comunity

Fireduck
2019-07-17 20:21:49
is this the actual bitcoinj? https://mvnrepository.com/artifact/org.bitcoinj/bitcoinj-core

Rotonen
2019-07-17 20:22:29
i'm a bit worried about opencms using scrypt :stuck_out_tongue: https://mvnrepository.com/artifact/org.opencms/opencms-core

Rotonen
2019-07-17 20:22:55
but if this is also the legit ethereum java thingy, seems legit https://mvnrepository.com/artifact/org.web3j/core

Rotonen
2019-07-17 20:23:15
the bitcoinj at least has the things I expect where I expect them

Fireduck
2019-07-17 20:23:37
so if they can use that, you can use that

Rotonen
2019-07-17 20:23:55
though no idea what they use it for

Rotonen
2019-07-17 20:24:01
but on rough general principles

Rotonen
2019-07-17 20:24:59
oh, loois is some actual chinese crypto thing http://loois.org/ Loois生态包括:全币种钱包、数字资产交易、去中心化交易协议整合、流动性系统、开放API、跨链金融产品(期货产品、基金产品、借贷产品等)、交易联盟(钱包联盟、订单联盟、合伙人联盟)等。

Rotonen
2019-07-17 20:25:06
so that's probably not malware

Rotonen
2019-07-17 20:25:21
ha

Fireduck
2019-07-17 20:25:48
hum, looks like scrypt is using jni

Fireduck
2019-07-17 20:25:56
based on the timeline there, i'd not necessarily assume loois to have gone well, but i have no idea

Rotonen
2019-07-17 20:25:57
it might be a no go if it is limiting my platforms at all

Fireduck
2019-07-17 20:26:20
did you avoid that madness on the ui?

Rotonen
2019-07-17 20:27:14
I haven't plumbed through the encryption into anything yet

Fireduck
2019-07-17 20:27:22
just started with the basic functions

Fireduck
2019-07-17 20:27:52
no, i mean in general native stuff through JNI where you'd have to figure out the multitude of OS versions out there?

Rotonen
2019-07-17 20:28:17
iirc javafx would have had that in store for you, but swing is still fully included in at least java 11 and java 12?

Rotonen
2019-07-17 20:29:34
yeah, I avoided javafx for that reason

Fireduck
2019-07-17 20:29:44
the only thing that uses JNI is rocksdb for the node

Fireduck
2019-07-17 20:30:05
and that's optional, right?

Rotonen
2019-07-17 20:30:16
it looks like the scrypt library will gracefully degrade to java if there is no jni

Fireduck
2019-07-17 20:30:21
yeah, don't need to run a node

Fireduck
2019-07-17 20:30:52
i compile my node on a mac and run it on a windows - iirc there were multiple databases or somesuch

Rotonen
2019-07-17 20:30:58
defaults to leveldb?

Rotonen
2019-07-17 20:31:27
rocksdb library I am using supports windows (64 bit), linux and mac

Fireduck
2019-07-17 20:31:49
there is another db, but I never implemented some things in it, so it can't currently do tx_index or addr_index

Fireduck
2019-07-17 20:32:19
oh it's precompiled and not your problem, gotcha

Rotonen
2019-07-17 20:36:57
yep

Fireduck
2019-07-17 21:14:10
*https://github.com/snowblossomcoin/snowblossom/compare/2ec453651ea2...1b877aee12aa*
https://github.com/snowblossomcoin/snowblossom/commit/6d7f66455d4bcfb8c0b24a6eb9de9bc4d8db01e6 - System 64 bit check
https://github.com/snowblossomcoin/snowblossom/commit/1b877aee12aa3dc8a77fa74a9d7786b56da767ea - Add message about 64-bit jvm

GitHub
2019-07-17 21:15:33
what happened here? https://github.com/snowblossomcoin/snowblossom/commit/1b877aee12aa3dc8a77fa74a9d7786b56da767ea#diff-46a4e77921d41b4aca84ac01d54be651L1

Rotonen
2019-07-17 21:16:12
i guess you confused git without using an explicit git rm?

Rotonen
2019-07-17 21:16:29
Moving that SystemUtil file to lib so it can be used from client

Fireduck
2019-07-17 21:16:50
kk, misread package as import and was full of confusion

Rotonen