OctaPi: cluster computing and cryptography

When I was a teacher, a question I was constantly asked by curious students was, “Can you teach us how to hack?” Turning this idea on its head, and teaching the techniques behind some of our most important national cyber security measures, is an excellent way of motivating students to do good. This is why the Raspberry Pi Foundation and GCHQ have been working together to bring you exciting new resources!

More computing power with the OctaPi

You may have read about GCHQ’s OctaPi computer in Issue 58 of the MagPi. The OctaPi is a cluster computer joining together the power of eight Raspberry Pis (i.e. 32 cores) in a distributed computer system to execute computations much faster than a single Pi could perform them.

OctaPi cluster

Can you feel the power?

We have created a brand-new tutorial on how to build your own OctaPi at home. Don’t have eight Raspberry Pis lying around? Build a TetraPi (4) or a HexaPi (6) instead! You could even build the OctaPi with Pi Zero Ws if you wish. You will be able to run any programs you like on your new cluster computer, as it has all the software of a regular Pi, but is more powerful.

OctaPi at the Cheltenham Science Festival

Understanding cryptography

You probably use public key cryptography online every day without even realising it, but now you can use your OctaPi to understand exactly how it keeps your data safe. Our new OctaPi: public key cryptography resource walks you through the invention of this type of encryption (spoiler: Diffie and Hellman weren’t the first to invent it!). In it, you’ll also learn how a public key is created, whether a brute force attack using the OctaPi could be used to find out a public key, and you will be able to try breaking an encryption example yourself.

These resources are some our most advanced educational materials yet, and fit in with the “Maker” level of the Raspberry Pi Foundation Digital Making Curriculum. The projects are ideal for older students, perhaps those looking to study Computer Science at university. And there’s more to come: we have two other OctaPi resources in the pipeline to make use of the OctaPi’s full capabilities, so watch this space!



Interesting that the OctaPi was assembled by Babcock and they aren’t even mentioned in the article! https://www.babcockinternational.com/


Could be that they had nothing to do with its creation. The contributors are referenced in the links within the article.


You need to have a version of the RPi 3 that has the Compute Module pins on the one side of the board. That way by using a DDR3 powered “motherboard”, you could have as many RPi3s and CMs to make up whatever sized Cluster needed. You should also develop a High Speed Storage Module, using ReRAM chips; A low Speed Storage Module allowing SATA disks, and Display Module allowing 4K graphics and surround sound. This would serve students from elementary level to PHDs, teachers, schools, and universities…


You forgot the Pink Ponies and Unicorns.

* Instead of mangling a Pi 3, one could just use a bunch of CMs for the cluster you describe… I don’t see much need there. The only justification would be cost, and making a Pi 3 variant that is both a Pi 3 and a CM (in lower production quantities than the Pi 3) is likely to make it cost _more_ than either current board.

* On ReRAM, Wikipedia says “Although anticipated as a replacement technology for flash memory, the cost benefit and performance benefit of RRAM have not been enough for companies to proceed with the replacement.” Hardly something ready for the RPF to start working on now (entirely aside from the fact that the main limitation of the current SoC is insufficient high-speed IO capacity).

* Without a major rework of the SoC, SATA disks in this module you suggest are going to ultimately come in through the existing USB2 bus, so you may as well use any off-the-shelf USB-to-SATA adapter.

* And 4K graphics and surround sound as something _necessary_ for learning? That seems pretty hard to justify.


Maybe I am not so far off after all…


It’s time to start thinking of “Blades” that have building block functionality, such as, storage, compute, and display. A true “LEGO” type of machine. A Pint of Raspberries verses a single berry…


That idea (a “modular computer”) has been tried before by various companies… usually ends up slower and more expensive than just a conventional computer.


The OctaPi sounds like a great project. But lets not lose that vision… As a teacher, you are not supposed to teach how to hack – ever! Your job is to teach the curriculum, which can and may include programming, engineering and making. That is it. If you are going to teach how to hack, you are to teach the kinds of hacking out there, the ethics and moral of hacking and why people hack. Nothing more. Last thing you need is some student testing the lesson on the school’s servers and having grades “adjusted” or worse. They want to learn how to hack – let them learn on their own outside the school environment. Consider it as a warning from a long standing computer teacher in NYC, because the consequence is your job and the ability to get another job in teaching anywhere.

This project is great, and it is not about “hacking.” Clustering computers, especially R-Pies, is great on learning how to create servers and services – something that is greatly needed in job market.


The problem is less with what is being taught, and more to do with the negative connotations of the word “hacking”. The majority of people these days see hacking as something only criminals do to steal or damage data.

A good definition of “hacking” from http://cyber.laws.com/hacking is:
“Computer hacking refers to the practice of modifying or altering computer software and hardware to accomplish a goal that is considered to be outside of the creator’s original objective.”

In this case we are hacking together an OctoPi. I believe that the RPi was originally intended to be standalone, and we are hacking it to work in a cluster.

I think that learning to modify (“hack”) electronics to work how you want them to is an excellent problem solving challenge, and the idea behind should be taught in schools. It would also be nice if people were taught that “hacking” isn’t necessarily bad, and giving someone your Facebook password doesn’t let them hack into your account (they just login normally).


This is a fairly arrogant and dangerous attitude to propagate. In order to combat malicious attacks, it’s important to understand their techniques and what is/isn’t possible on a very detailed level. Could you imagine a security consultant without a fundamental knowledge of common cracking techniques? Students should absolutely be introduced to cryptographic manipulation on a curricular level.

If the school’s systems can be cracked by introductory students, they are surely not secure enough to withstand the cracking communities. That needs to be addressed on an administrative level, sooner rather than later; not by withholding knowledge from interested students.


If someone built a software that you think people can get into and adjust grades that means they had a bad teacher that didnt show them hacking. Teaching your definition of hacking actually makes students aware of the options and prevents them from building software that can easly be access to, for example, adjust grades. So you should absolutely teach hacking, so that your students become engineers that build good software. besides minority of hacking occurs via breaking in through security holes – it’s mostly social engineering and exploiting human stupidity like post-its with passwords on it.


Would this work with the Cluster hat? Got one and haven’t really done much with it yet?


Hacking != cracking. It’s only illegal if you crack other people’s property _without_ permission. White hackers, with full permission from the owner, is perfectly legal. Hacking is not limited to computer. Anytime you repurpose an item to do something that is beyond the original intent, that’s hacking. Not cracking.

I wouldn’t look at NYC as an example of good tech school. Massachusetts, Stanford, and Utah are better examples.

Nobody uses Beowulf cluster anymore?


The cluster sounds like a fun project. A couple of Bitscop Blade Quatros and a stack of RPis for the summer!


This is a great project as it is necessary for the concepts in clustering and parallel processing to become the common currency of the computational environment, as that is the way of future progress.

Crucial to this is encouraging systems users to think outside of the box so as to develop novel solutions to problems or to locate faults and flaws in existing configurations. Hacking is crucial to this stratagem and if you own a piece of hardware you should be able to modify it to meet your requirements. A truly regressive step is to use code on your systems to which you have no access so therefore do not know what actual instructions that secret, proprietary code is executing.

It is absolutely amazing that corporations have succeeded in persuading customer to believe their promises as to how their commercial code works and to part with real money for software licences for code with unverifiable security and performance levels.

If you do not hack your software and hardware then you are a mere consumer using an appliance, comfortable in your ignorance and totally unaware of being exploited by the owners of proprietary code and hardware.

Fortunately people will use and understand the Raspberry Pi and so gain freedom from the opium of consumer desire for the latest expensive closed source trinket.



Hi, I am looking into building this cluster for fun and learning.
But my I am struggeling finding out how to power all 8 RPi3s without having to have 8 powersupplys to them.

I have been looking into having 2 5VDC 10A power supplys with two 1 to 4 2.1 mm DC plugs so I only need two cables in the wall socket.

I’m also looking into hacking a ATX PSU or a USB hub to connect to the RPi3s.

Any ideas other ides how to power this cluster?


The instructions suggest using using a dedicated WiFi router. It may be that the network and network speed is a limitation? Why do they not recommend an eight+ port Gigabit switch?
Even though pi3 doesn’t use gigabit, the speed of one of those little switches is far better than WiFi, especially with any possibility of channel sharing.
As it all uses python, I don’t see why a few other Linux PC’s couldn’t be mixed in, either. How about using a cluster of PC’s to support your Pi projects?

Leave a Comment

Comments are closed