Siglent SDS1204X-E - SCA - 1GSa/s not enough? - Page 1
Forum section: electronics / testgear

author: jokow
author_rank: Newbie
timestamp: February 28, 2020, 07:09:04 pm
content: Hi,I'd like to get a bit more into side channel attacks (power analysis, fault injection/voltage glitching). In addition, I made a ham radio license recently and I'd like to gain more experience now with building rf stuff. I did some microcontroller programming in the past, but I've never designed a larger circuit. I'm currently setting a home lab and I'm looking for an oscilloscope.For stuff like voltage glitching/fault injection I thought I need something fast. Let's say I want to glitch an Atmel xmega with a 32 MHz clock speed, in order to see the gltich properly, I thought I need at least 200 MHz (might be even too slow, but I think I can't afford a more expensive oscilloscope). Now I wonder, are the 1GSa/s not enough? I often read that one should have at least 10 times the bandwith (2GSa/s in this case?)?Would you maybe recommend a totally different oscilloscope? My budget are 1000€ max, though this is quite a lot of money for me and my wife wouldn't be happy with paying that much.Edit: I changed the topic. I just realized the SDS 1202X-E also lacks other features of the 1204X-E.

author: tautech
author_rank: Super Contributor
timestamp: February 28, 2020, 07:31:40 pm
content: Welcome to the forum.The webrowser is most useful if you need to run routines or port to a larger PC display.If you're concerned about the sampling rate maybe 2 GSa/s SDS2202X-E is a better fit and these do have the webserver and a MSO option like the 4ch X-E's.

author: Fungus
author_rank: Super Contributor
timestamp: February 28, 2020, 07:42:00 pm
content: Quote from: jokow on February 28, 2020, 07:09:04 pmFor that much you can have a Rigol MSO5074 and hack it to 350Mhz. It has 8GSa/sec sample rate.

author: jokow
author_rank: Newbie
timestamp: February 28, 2020, 07:53:41 pm
content: QuoteI had a look at the SDS2000X-E series, but for some reason I couldn't find positive customer reviews. E.g. on batronix, there is only one review (a negative one). Are there known issues with this series? Or is it just very new so that there are not many customer reviews?QuoteActually, this was my first choice. The thing is: I have some ethical/moral issues with that. It feels wrong to my buying something, which upgrade options costs thousands of dollars and I take them for free. On the other hand, I could not effort the scope otherwise.I even wonder why this is still possible. Why does Rigol not change that? There would be ways to protect from those free upgrades. Do they not care? Or is this some sort of strange marketing thing?

author: DaJMasta
author_rank: Super Contributor
timestamp: February 28, 2020, 08:01:17 pm
content: This is not a realistic requirement for the scope's bandwidth.The Nyquist frequency for a given sample rate is just under half of the sample rate - in terms of a 1GS/s converter, this would be just about 500MHz. The frontend of your scope does not have 500MHz of bandwidth, it has maybe half that, even though the stated bandwidth is less. Beyond that bandwidth, the incoming signal is significantly attenuated (stated input bandwidth is typically the -3dB point for the filter on the input, which on digital scopes has a higher rolloff than analog ones), so the amount of higher frequency signal that gets through decreases very quickly as frequency increases.Why does this matter? Because the amplitude of the higher frequency content is attenuated so strongly, a sin(x)/x interpolation between points only somewhat above double the sample rate is actually a very close representation of the complete signal digitized. That means while extra sample rate (beyond 500MS/s or so for your scope) will make the waveform look smoother or more filled in in dots display mode, in standard interpolated mode, the signal reconstructed from the 500MS/s-ish sample rate to get a good representation of a signal up to 200MHz on your frontend is going to look just like an arbitrarily high sample rate signal. If you take your same scope frontend and put a 10GS/s converter behind it, the look of the signal will be basically the same because of the frontend bandwidth.Now if you're looking at strongly attenuated signals above your scope's bandwidth anyways, or you want to be doing oversampling post processing (like eres), extra sample rate can be useful.... but within the stated bandwidth of the scope, 2.5x the input bandwidth in sample rate is plenty to show you the real signal that comes through the frontend using sin(x)/x interpolation, nothing more is really needed.To your original application, your 32MHz signal with a glitch that included frequency content 500MHz+ for it not to be caught by a 1GS/s sample rate, and because of the input filtering that is part of the scope's frontend, any glitch with that high a frequency content would be minuscule on the display anyways.

author: Mechatrommer
author_rank: Super Contributor
timestamp: February 28, 2020, 08:07:12 pm
content: moral? if i saw a man stealing my house, but then i let it happen without doing anything, and then let others steal as well in the future. what does it tells you? if you are tight you can just buy Rigol DS1054Z or Siglent suggested by others. 1GSps is good for up to 400MHz, the analog front end (where you connect the DSO probe) is the limit, its tested and accepted Rigol DS1054Z has 100MHz+ BW, sometime nearly 200MHz. with your 32MHz glitch, DS1054Z can show that fine. its just if you want more detailed representation, such as a glitch in the glitch, or nice squareness of it, ps jitter between signals etc, then you'll need a higher priced DSO. how much detailed needed? that depends on your need, preferences and experience. without having clue of that, its all will be green and blue. thats why most of us just simply starts with the cheapest option. when we figured out we need more, its been less spent on the wrong item. but if you spent on high priced item and figured out later its not for you, which is worse inversement? TLDW, ymmv.

author: Fungus
author_rank: Super Contributor
timestamp: February 28, 2020, 08:12:49 pm
content: Quote from: jokow on February 28, 2020, 07:53:41 pmIt's all part of their marketing plan.Quote from: jokow on February 28, 2020, 07:53:41 pmCorrect, and Rigol would rather you buy one of their and hack it than buy a Siglent (or whatever).Quote from: jokow on February 28, 2020, 07:53:41 pmIt's all part of the plan, it's built into their strategy spreadsheet.

author: nctnico
author_rank: Super Contributor
timestamp: February 28, 2020, 08:27:03 pm
content: If you want to look at HF glitches in detail then I'd get a 1GHz+ scope. Older ones are available on the used market within your budget. Don't worry about probes too much because at these frequencies a direct cable connection will give a way better result anyway.

author: tautech
author_rank: Super Contributor
timestamp: February 28, 2020, 08:31:37 pm
content: Quote from: jokow on February 28, 2020, 07:53:41 pmNope, no known issues and they've been out around ~12 months. Wireless, FFT and Bode plot capable just like SDS1004X-E models.More info on them here:https://www.eevblog.com/forum/testgear/siglent-sds2000x-e/They were released after the 1202X-E and 1104/1204X-E and have their capabilities modeled on these earlier series but they offer higher end HW and 50 ohm input options.

author: tmbinc
author_rank: Frequent Contributor
timestamp: February 28, 2020, 09:53:16 pm
content: SCA/DPA and fault injection doesn't require fancy equipment. It requires fancy software and slightly fancy (but low-tech) analog hardware setup. A high bandwidth scope is not the answer to typical problems with DPA.There are two ways to do DPA: either you optimize your setup until you can minimize the number of samples, or just get the key. Unless you're attempting to productize a hack that requires DPA, just getting the key is usually simpler.What you need is a scope that you can script well. A scope that doesn't crash if you repeatedly instruct it to record a large buffer. Ideally a scope with segmented capture. You also may need an pre-amplifier, but almost always the noise is due to uncorrelated sources (which ideally go away with many samples, but still screw you up due to non-linearities). So replacing all power supplies with LDOs helps a lot. Increase your current shunt until your device crashes, then slightly turn up the voltage. Don't be afraid of running devices out-of-spec for the sake of better measurements, they won't die quickly. (And if they crash, you crossed the bridge to fault injection...)For extreme cases, like capturing samples over multiple days, you should use an external reference (so get a scope that takes an external reference) and somehow try to keep the temperature of your setup constant.Most often with DPA the information is in a few MHz of bandwidth. Usually it's low enough that you can just sample it, but worst-case you take a mixer and move it to where you need it, or get some RF gear that has an IF output. When doing DPA, I'm mostly looking at the time domain anyway, and very rarely a leak is less than a clock cycle. You may see slower rise time, but the data is still there which is all that counts.For fault injection - again you could get a $$$ pulse generator, build a perfect voltage jump and then remove all capacities that screw up your fall/rise time, or you just play with slew rate, width and voltage. Any FPGA will be sufficient to give you a deterministic, fine-grained delay (probably synchronized to the device-under-test), but I've done glitching with just a microcontroller that toggles a pin for reset, clock and glitch-enable (that drives a FET that shortcuts VCC).

author: jokow
author_rank: Newbie
timestamp: February 29, 2020, 10:30:58 pm
content: First of all, thanks a lot for all your answers!Quote from: DaJMasta on February 28, 2020, 08:01:17 pmMaybe I've misunderstood that: From my understanding Nyquist-Shannon sampling theorem states, that you need to sample > 2 times the speed of the fastest frequency component. But that is only true for time continuous signals like a sinus, it does not work for a glitch which is not a time continuous signal. Therefore the sampling rate needs to be higher, to get a more accurate interpolation result?Quote from: tmbinc on February 28, 2020, 09:53:16 pmI'm not sure if I understood that part. Can you explain this a bit more?Quote from: tmbincWhat scope do you use?Quote from: tmbincUnderstood that partQuote from: tmbincSo can you recommend a scope?Quote from: tmbincMixing to an IF, that's cleverQuote from: nctnico on February 28, 2020, 08:27:03 pmSo I have different opinions now.With what tmbinc wrote, I really might not need a high bandwith. Will wait for what he is actually using.I'm still reading through the different posts regarding the 1204X-E and the 2000X-E Series and also the Rigol MSO5074. Now I have so many opinions, I'm even more confused.

author: DaJMasta
author_rank: Super Contributor
timestamp: March 01, 2020, 01:16:07 am
content: Quote from: jokow on February 29, 2020, 10:30:58 pmYes and no, you only need over double the sample rate to measure a pure tone sine, but since every waveform is a collection of sine waves at various frequencies and amplitudes, you only need the sample rate to be double what that highest frequency component is. So with a 32MHz square wave, you'll have prominent harmonic content at the odd intervals, and probably a good bit at 96MHz, 160MHz, and some at 224MHz. That's a good justification for the higher bandwidth scope and the sample rate needed to measure it (like a 50MHz 100MS/s scope), but high frequency content in signals generally translates to very quick edge rates - short rise or fall time - so unless your glitch has some very steep transition in it (steeper than the square wave edge), the frequency content that makes up that part of the signal will be lower than those upper harmonics of your base square wave, so you won't need any additional sample rate to be able to measure them. With the nature of glitches usually being excessive parasitics or slow/incomplete/imbalanced switching from the driver or receiver, the glitch will almost never have higher harmonic content than the base signal (unless it's like injected high frequency interference).Take your current scope and look at various signals with FFT analysis going. You'll be able to see the upper harmonic content of your square wave, and then if you measure a version with a glitch, see where those additional tones fall - just over double the highest frequency of interest is the only sample rate you need to measure that signal. As a general rule, some scopes will have only this much in terms of sample rate, some will have extra because they're using a standard ADC that has extra (like if there are higher bandwidth models with the same base hardware) or because they sometimes run half sample rate with twice the channels (sharing the ADC). Beyond that, it's either a marketing gimmick or they're trying to let you use eres mode for free (which is nice, I won't complain). There definitely are applications for more scope than you've got, but unless you're dealing with some seriously fast transitioning logic built up with parasitics in mind, 200MHz bandwidth and 1GS/s is going to be sufficient to see the signals you're describing.

author: tmbinc
author_rank: Frequent Contributor
timestamp: March 01, 2020, 08:51:51 am
content: I think we all agree that you need a very high bandwidth scope to look at fast glitch pulses in sufficient accuracy.The question though is if you really need to do that.If you look at fault injection from a scientific perspective, the answer is likely "yes". You would need a HF signal chain, a very fast signal generator, impedance-controlled power lines to all make this reproducible. It'll be significant effort to just characterize everything - starting from measuring capacitance, your FET's Rdson, your power rail effective series resistance etc.But if you "just want to get the job done", you don't need any of this. Instead you just try - if the DUT crashes, you've glitched too long/strong. If the DUT doesn't react to your glitch, you make the glitch longer or improve fall times. Within a few iterations you will likely get something that in practice works as well as a "scientific glitch", except that you can't fully characterize it and it probably significantly depends on external factors (such as temperature, cable properties etc). But in many practical scenarios ("I want to get this global key") all of this doesn't matter, since the attack only has to work once.For SCA, it's very similar. There are scientific papers that can extract an AES key from a double-digit number of traces. They use high-quality differential probes, shielded environments and months of setup cost. But then in practice you can just take 100x as many samples (still very viable in most scenarios), do a little bit of post-processing like rejecting bad quality traces (for example where there was a lot of random interference, like someone switching on a light), and still get the key. No need for a differential probe if you just sample the power rail on the high side with an offset (which most/all scopes can do).Really the best here is to get a lot of practice, and you can do that with cheap scopes. Paul Kocher did his first power analysis using an analog oscilloscope, watching the "square"/"multiple" pulses of a smartcard RSA implementation.Once you run into real limitations, you could then invest in the right set of equipment. Or - and that's not a bad choices either, but it depends on your financial capacity - you throw a lot of money at the problem, and see what sticks. The latter option is not even a bad strategy, especially for companies, where just a few hour of engineering works equals to a nice scope.For the record, I've did most of my DPA work on a Tek DPO4034 and later a Tek DPO5034. But back in the days there weren't budget alternatives for large sample depth.Also to add: For SCA, at some point the bottleneck is the rate at which samples can be processed, so you need to limit either a.) # traces, b.) Samplerate/Bandwidth or c.) duration.Duration is usually fixed through the region that has the secret operation. Eventually my observation is that higher #traces brings more benefits than higher bandwidth. So for many scenarios you can get away with just a few samples per clock transition, so unless you're doing SCA on multi-100MHz devices, a 100MHz scope should be fully sufficient.

author: Fungus
author_rank: Super Contributor
timestamp: March 01, 2020, 11:29:29 am
content: Quote from: jokow on February 29, 2020, 10:30:58 pmAll real-world signals are time continuous.Only imaginary/theoretical signals can be discontinuous.

author: pascal_sweden
author_rank: Super Contributor
timestamp: March 01, 2020, 04:38:27 pm
content: Quote from: jokow on February 28, 2020, 07:09:04 pmDigital Oscilloscope for Side Channel Attacks = Hardware hackingQuote from: jokow on February 28, 2020, 07:53:41 pmEthical issues upgrading the BW of a Digital Oscilloscope while being interested in Hardware hacking?How do these 2 things go hand in hand?

author: tmbinc
author_rank: Frequent Contributor
timestamp: March 01, 2020, 04:44:42 pm
content: Quote from: pascal_sweden on March 01, 2020, 04:38:27 pm"Responsible Disclosure" for example - you could report the results of the hardware hacking to the vendor, possibly under a bug-bounty program.Or just "R&D" (I could use DPA to ensure I know the weaknesses, then design a better solution.)

author: tv84
author_rank: Super Contributor
timestamp: March 02, 2020, 04:36:36 pm
content: And we can also license-upgrade the BW just to check that it works as expected... then downgrade, after ALL tests are done.

author: jokow
author_rank: Newbie
timestamp: March 03, 2020, 04:47:30 pm
content: Thanks again for all your answers!QuoteI was wondering when someone would ask that question. Hacking has nothing to do with illegal activities. Let me quote RFC 1392 from 1993 which describes a Hacker like that (https://tools.ietf.org/html/rfc1392#appendix-H):QuoteActually, I'm not the only one having this kind of conflict:https://twitter.com/LiveOverflow/status/917564652988416000Quote from: tmbinc on March 01, 2020, 08:51:51 amThank you, your answers help me a lot. I'm still unsure whether to take the SDS1204X-E (200 MHz bandwith, 1GSa/s, 4 channels) vs the SDS2202X-E (200MHz, 2GSa/s, 2 channels). Judging from your posts, I tend towards the first one, though it costs a bit more. Another alternative would be the SDS2352X-E (350MHz, 2GSa/s, 2 channels). The price is nearly the same as the SDS1204X-E. From what you wrote, it seems more channels make more sense, than investing in bandwith.Regarding the Rigol I did some more reading. From what I've read, the firmware still seems to be a bit buggy, it also seems to be less responsive. In Germany I would need to pay roughly 300€ more, which means roughly 25% higher price and I would need to unlock the features.

author: tmbinc
author_rank: Frequent Contributor
timestamp: March 03, 2020, 05:22:28 pm
content: Keep in mind that for the SDS1104X-E, the only difference (that I'm aware of) between 100 MHz and 200 MHz are the FIR filter coefficients that are applied to the ADC data; the rest of the signal acquisition path is the same. (Now it is a valid question if you're really getting sufficient ENOB between 100 and 200 MHz that you couldn't just post-process the data to the same quality.)

author: Fungus
author_rank: Super Contributor
timestamp: March 03, 2020, 10:16:43 pm
content: Quote from: jokow on March 03, 2020, 04:47:30 pmOne of my business cards has "Hacker" as job title.Most people assume it means I can pirate software for them.(no, that's a "cracker"...)