riscure / jlsca Goto Github PK
View Code? Open in Web Editor NEWSide-channel toolkit in Julia
License: GNU General Public License v3.0
Side-channel toolkit in Julia
License: GNU General Public License v3.0
After updating Julia to v.1.0.0 and using the newest Jlsca this happens:
_.julia\packages\Jlsca\PpvWi\examples> julia main-condavg.jl examples/aes128_mc_ciph_c8bb4cbd817f9bc6ff762dc4298a29e4.trs ERROR: LoadError: LoadError: UndefVarError: @everywhere not defined_
Any ideas?
Sidenote: Tests run inside julia repl ("test Jlsca") work/pass, but the examples no longer work.
Hi,
I was working on a CPA problem that I was bashing my head in using jlsca and which was trivially solved by lascar and I wanted to understand the difference / my mistake. Here is the data to reproduce:
Here is my code for jlsca:
using Jlsca.Trs
using Jlsca.Sca
using Jlsca.Align
using Plots
using Statistics
fname = "/home/kali/machines/self/hw/cpa/nMY.ts"
keyByteNum = 1
condavg = false;
trs = InspectorTrace(fname)
attack = AesSboxAttack()
attack.xor = true
anal = IncrementalCPA() # Also tested CPA()
anal.leakages = [HW()] # Also tested with ID(), Bit(0) and all bits
params = DpaAttack(attack,anal)
params.maxCols = 1042
params.maxColsPost = 1042
params.dataOffset = 1
params.targetOffsets = collect(1:16)
params.updateInterval = 10
params.knownKey = missing
params.keepraw = true
getTrs() = trs
@time rankdata = sca(DistributedTrace(getTrs), params, 1, nrTraces);
And here is my code for lascar, which runs perfectly:
import numpy as np
from lascar import Session, CpaEngine, ConsoleOutputMethod, MatPlotLibOutputMethod, RankProgressionOutputMethod, ScoreProgressionOutputMethod, DictOutputMethod
from lascar.container import TraceBatchContainer
from lascar.tools.aes import sbox
traces = np.load("traces.npy")
values = np.load("pts.npy")
engines = [
CpaEngine(f"cpa{i}", lambda v, k, z=i: sbox[v[z] ^ k], range(256))
for i in range(16)
]
t = TraceBatchContainer(traces, values)
s = Session(t)
s.add_engines(engines)
s.output_method = ConsoleOutputMethod(*engines)
s.run()
If I understand correctly, lascar is using an identity leakage model, but I'm not 100% sure if it doesn't take the hamming weight somewhere still. For the rest, the lascar code - to me - looks identical to what I try to do in jlsca, but I'm probably missing an important step.
ParallelIncrementalCPATestWithInterval() fails with EOFError.
Dear, Riscure.
Are planning add support PQC guessing and DL in Jlsca?
For example add support DL via Flux.jl or TensorFlow.jl Julia packages.
I used the Jlsca library to perform power analysis attacks for my master's thesis experiment and I would like to know how the rank data is generated. I spent quite a bit of time looking through the code, but I'm not very familiar with the Julia programming language.
Here is the attack that I am running:
trs = InspectorTrace(insfname)
params = DpaAttack(AesSboxAttack(), IncrementalCPA())
params.dataOffset = 1
params.attack.direction = FORWARD
params.analysis.leakages = [HW()]
numberOfTraces = length(trs);
rankData = sca(trs, params, 1, numberOfTraces)
key = getKey(params,rankData)
Dear Riscure
Are you can implement guesser & selected function for Jlsca?
For example simplifided version of ECC module in Inspector SCA software.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.