The problem of the secret message raised last week is solved, paradoxically, by making it more complicated: the gentleman adds a second lock to the box and sends it back to the lady, who removes the first lock and sends it back to the gentleman, who now all you have to do is open your own padlock. A slow but safe system, because all the time the message is out of the reach of the indiscreet messenger.

If we change the locks for large prime numbers, we have an effective encryption system widely spread. Let’s imagine that, in pre-computer times, A wants to share with B two secret numbers: 1901 and 2713 (or the difference between the two: 2713 – 1901 = 812). A multiplies both numbers and sends the result to B by mail or by phone without fear, because, even if someone suspects that 5157413 is the product of two significant numbers, without the help of a computer it is extremely difficult to find these factors (and with the help of a computer too, if the cousins are big enough). B, in turn, multiplies the received number by another four-digit prime, for example, 1301, and sends the product, 6709794313, to A, who divides it by one of its two primes, for example, 1901, and sends it the result to B, which when dividing by its own prime obtains the other prime of A: 3529613/1301 = 2713.

I have used cousins of only four digits to illustrate this encryption system (known as RSA by its creators: Rivest, Shamir and Adleman), but at present, and given the enormous computing power achieved by computers, the primes used have to be hundreds of figures to ensure safety.

In relation to the other problems of the past week, see the corresponding comments section, where they have been extensively analyzed.

### From boxes to packages

Although not all: problem 2 did not deserve the attention of my astute readers, who focused on the secret message and the traveling balls. And yet it is an interesting packaging problem that I propose again accompanied by an overhead view of the box (without lid):

In an orthohedral box there are three 10-centimeter diameter balls tangent to each other and tangent to the walls, the base, and the lid of the box. How long are the sides of the box?

The stacking and packing of spheres of the same size is a question that has interested mathematicians and engineers since ancient times. The British mathematician and astronomer Thomas Harriot (who, among other things, introduced the symbols> and <into mathematical notation) was the first to calculate, in the middle of the 16th century, the number of cannonballs in a stack in the form pyramid with a square base (how many are there?), and Gauss showed that the maximum density obtainable by filling the three-dimensional space with equal spheres is approximately 3/4 (exactly π / 3√2). The density of a packing is the fraction of space occupied by the spheres. What is this maximum density packing like?

Moving down from 3 dimensions to 2, the packing of spheres in space becomes the packing of circles in the plane. And again it was Gauss who showed that the maximum density is achieved, in this case, by means of the hexagonal arrangement, in which each circle is surrounded by 6 other tangents to it. Can you calculate the density of this packing? To avoid the distorting effect of the edges of a real surface, the problem is posed in an infinite plane.

If the circles thus packed were elastic and grew pressing against each other, they would form a hexagonal lattice. That is, in fact, what happens in a honeycomb.

*You can follow ***MATTER ***on** Facebook**,** Twitter** and** Instagram**, or sign up here to receive **our weekly newsletter**.*