This is the outline of the course. Curious. Okay, this is the outline of the course. So we will try today to introduce and be motivate historically the subject why information is important in thermodynamics and so on. And probably many of you or I don't know if somebody in the school already mentioned that the origin of this problem is the Maxwell demon which is at the something that was a puzzle or a problem that came out by Maxwell at the same time as thermodynamics started or less in a statistical mechanics start. So the problem of information has been relating with thermodynamics or since the very beginning of thermodynamics. So this is the idea today is to give a little history and then the basic concepts in information theory because we need to, this will be very qualitative but the idea of the course is that you give you at least the basic tools to work with information and thermodynamics and to relate both. So this is more quantitative. So we will give today this morning some basic concept of information theory as some basic concept with our work and then how the two are related. And there is two exercises, very easy exercises that Bella already distributed among you. And the idea is that this afternoon because it is three hours session so I cannot talk, well I can't but you cannot listen before three hours. We will try to do a next class of exercises. I mean to solve the exercises here. Okay, so let's start with this history. As I said, the problem of information and thermodynamics is parallel to the problem or it's illustrated by the Maxwell-Demon. This is a book that is a compilation of the main papers on the Maxwell-Demon. There is a second edition, much more papers and it's a story of the Maxwell-Demon. So we will start by, I guess, I don't know if in undergraduate courses people have told you about the Maxwell-Demon but I will tell you the main idea. And then Maxwell-Demon is a bit complicated. So there is something called the Seeler engine introduced by Seeler in 1912. And most people work in the field of quantum of the MIMS information work with the Seeler engine. And actually the exercise that you have to do this afternoon this is a version of the Seeler engine. And then we will see, this is a story that comes from, Maxwell-Demon was introduced in 1865 and the Seeler engine in 1912. And then there was a lot of people working on that that when there was a real revolution on this topic was in the 70s, 1970s, where with Landauer and Bennett and they found a completely new way of looking at the problem of the Maxwell-Demon. And on top of that, they created this idea of the physical consequences of information. So if information has physical. Okay, so this is the story. And here is some experiments that are these experiments. We were able to do experiments on Maxwell-Demon in the last decade or so. So we'll have next week, John Bertheshofer who is one of the people who has done experiments on the Maxwell-Demon and he will explain that. So this is 1867, 1867. And this is the first time the idea of the Maxwell-Demon appears. He's in a letter to a friend. The friend was writing a book on thermodynamics and asked Maxwell for his opinion. And he, like the big genius in this is that he just in a letter in a paragraph, he presents the idea. And he says, he started saying to pick a hole. Actually, the date asked him to see if the book is correct in the sense that if the book attributes to the fathers of thermodynamics correctly, not that nobody gets angry with the book. So, and Maxwell says, well, I cannot tell you too much about that but I can pick holes. So in English, pick holes means like find some small controversy or small. And this is a hole, a pick a hole in the second law of thermodynamics. You think that the second law of thermodynamics is one of the most important laws in physics. And he was in this paragraph putting into question the validity or nature of second law. And while the idea is very simple, you have two gases separated by a wall. One is hot and the other is cold. And you know from a statistical mechanics that hot means that the particles are in average and the hot ones are faster than the cold one. But Maxwell, like this year or maybe one year after, one year before, he discovered the Maxwell distribution of velocities. But you know that in a gas, the average is true. His average is higher. Average velocity is higher in the cold than in the cold. But there is the distribution. So in the hot gas, there are many slow particles. And in the cold gas, there are many fast particles. So Maxwell immediately saw this and thought if there is somebody that can manipulate a small hole, a small wall, a small door separating the two gases. And when the, this is the demo. When the demo sees a slow particle in the hot gas trying to cross, he opens the door. And when he sees a fast particle in the cold gas or a slow particle in the hot gas, so he allows these particles to cross. So in this way, the demo will be transferring energy from cold to hot, like an air condition, like a heat pump. So he will be doing this. And Maxwell thought, well, maybe he can do all these operations without any cost. This means that we will have free air conditioning or free heating. So all of our energy problems will be solved. So the idea is that can we by observing, by measuring, by observing and by acting according to this observation, can we beat the second law? Of course the second law, the second law, one of the statements of the second law is that we cannot transfer energy from cold to hot. We cannot pump energy without spending energy without doing work. And this is in contradiction with the second law. So Maxwell's demo was beating the second law somehow by using information. Here is the trick. So you can interrupt me and there are people online that, so it's good that you have clear idea of all the concepts that I'm going to tell you. So if you, it's this clear that Maxwell's demo many people probably have heard about it. And look at the, think of the role of information. So it is important that the demo measures, what is measuring? Messuring is acquiring some information system and then acts according to this measurement. So it opens or closes. This is a Maxwell's demo. So many people has studied this, like Leo B. Yawin. So people thought that there is a cost of in the demo operation. For instance, a cost of measuring because if you want to measure the partition or the velocity of a particle, you have to send a photon and so on. Some people think that this is the cost of operating the door. But one can prove that this has, of course, in a real situation, this will have some cost, but some cost, but this cost is not bound. I mean, you cannot do it as small as you like. There are other bias. For instance, you can think of this door as automatic. And this has, it's related with Feynman-Bracket, I think Edgar mentioned Feynman-Bracket. So this is also related with Feynman-Bracket and Brackets in general. This is why also in biology, these people are interested in this. Ah, here is, sorry, here is, for instance, yeah, here is one case where this is even easier. This is the original Maxwell demo where you pump heat from coat to coat. And the information that you get is the position and the speed of the particle. This is even much simpler. This is just two gases and the demo opens when a particle tries to cross from left to right. So he can accumulate particles on the right. And now you can use this gradient of density, which is a gradient of pressure, if these are gases who create, who extract work from the system. Here you only need a position. And here you can think, ah, this work could be done by a bulb, by something with a spring, something like that. And this is what Feynman proved that it is impossible in the Feynman-Bracket, okay. So the story in 1912, Siddharth, Leo Siddharth introduced a new version of the Maxwell demo, which is the one that people has used all the time. And you will see why. The Siddharth engine is a thousand of papers on the Siddharth engine and as I said, 90% of chemical information tries to solve this problem, Siddharth engine. The Siddharth engine is the following. You have a gas, well, a gas. A gas is a single molecule. It's called a single molecule gas. So it's a particle in the box, a temperature T. What means temperature T here? Well, that in every collision, the gas thermal, the particle thermalizes. So you have a random exchange of energy between the particle and the surrounding back, but this is zero energy. In average, the particle doesn't, there is no a net flow of energy from the particle to the right. So, you do the following. There is an external agent, some demon, if you like, that introduces a pistol in the middle of the gas. Then the demon measures, the demon measures where the particle is, it's a binary measurement. So it's left or right. And if it is on the left, as here, it performs an adiabatic expansion, a reversible expansion of the gas. Now that the gas can do, the expansion of the gas can be free, which is irreversible, because it's not increasing the universe. But if you exert a pressure, then the gas is doing some work. And if you remember some of my name, this is an adiabatic expansion. And in this adiabatic expansion, it's reversible. So you exert the same pressure, you change the side of the pressure, and then you do the completely reversible response. So this is a reversible expansion. And then you remove the pistol, sorry that it's not here. You remove the pistol, or I can do, maybe I can do this more.  This is a cycle, you see? There is a cycle. And actually it's a system, which is in contact with the thermal bath, because the walls are a temperature key. And there is a, it is doing some work when you move the pistol. So it's like, this is the schematic area. As always in stochastic thermodynamics, we will have this convention of science. So heat is positive when, everything is positive when it goes to the system. But here we will, now here, we will calculate the extracted work. So how much work do we extract when we do this? Well, you can use the formula for the work in thermodynamics. Since this is a single particle, we can use the ideal gas equation that pressure is KT divided by volume. And then you will get this formula. And here, what we have is an expansion from an initial volume, one half, to a total volume. This is the total volume of the box, which is one. Well, one, volume divided by volume divided by two. So this is KT log. So in this expansion, we get a work KT log two. And where this energy comes from? It comes from the walls. The specific mechanism is that when I move the piston, the particle, the collisions with the moving piston, when you have a particle that collides with a wall that is moving, it loses some energy. Because the collision is not, the velocity is not the same after the collision, for the collision, it loses some energy. And this energy is recovered when it collides with the wall. So there is a flow of energy from the bath, from the bath to the external agent. So we are extracting energy from a single thermal bath. This is called a perpetuum molecule of the second kind. The perpetuum molecule of the first kind is the machine that creates energy. And the first law, what's the first law? The fact that the energy is constant, prevents this to occur. The perpetuum molecule of the second kind is a machine that can extract energy from a single bath. And this will also be the solution for our process of energy, because you take a ton of water from the sea, and it has a lot of energy. I mean, a ton of water, even at that, and it has a lot of energy, so it will extract this energy. It will be able to go ahead of the process. So, okay, so we will, this is the work that we extract. We will follow the following convention of science. The work is positive when it goes to the system. So this means that the work is, but the problem is that there is not here that's not here. The last thing that, okay. Why negative sign in equation three? What is equation three? Why negative signs? Where? In the work zone of the system. Yeah, in the formula, it's not here. Well, because the convention is designed is that the work is positive when it goes, when energy flows to the system. But extracts the work, when we say extracted work is minus this, when we extract work is that we extract work from the system. So this is this equation. I don't know if... But anyway. Okay, now this, you were asking for this slide. So when we say extracted, this is extracted work and this is work done on the system. So this is the one instead, one is minus the other. I use this because I think it's more intuitive for people to calculate the extracted work. And you see that you start working on expansion but it is at the convention is the minus sign. So by the way, the exercise, the first exercise maybe something can be done with this information. It can be done with this information. So we will generalize these and we will study this and one of the possible modifications is that you can assume that the demo has to measure here. Here the measurement is necessary. Why? Because you have to make this expansion reversible, you have to exert the force against expansion. So if you exert the force in the opposite way, in the opposite side, then you do the opposite. You compress the gas instead of making an expansion. So if you don't measure, you cannot extract work. Now one can ask what happens if you measure but your measurement is not precise and you have some error in the measurement. So if you have some error in the measurement, then you have, you cannot, first you cannot do this expansion because what happens if you have an error? Maybe the particle is here. So you cannot expand all the way. You have to expand up to some alpha, some place here. And then you have a possibility. Sometimes you compress the gas, sometimes you expand the gas. So you have to work this very easy exercise. And you, and there is an optimal protocol that extracts the optimal amount of energy. So you just have to do this exercise. We will do this exercise today, this afternoon. Questions? No questions. Okay, May. Yeah. So this alpha, you can expand it up to a certain alpha. What is this alpha? How does it relates to? You have to solve it. Oh, okay, that's okay, I will do it. Well, I will, thank you, I will thank you. Okay. Yeah. Yeah, this is a good question, and this is a criticism. So this set has a lot of criticisms and questions. One is this one. If you need some work to insert the pistol, no, this is your question. Yeah, to insert it with zero, with zero cost, you need to do it fast and with the other problem, find the particle, it's almost zero. And it's true that there are some, that you can do it with zero cost, the insertion. And this is interesting because in quantum mechanics, you can, if the system is quantum, inserting the pistol at least at zero temperature or low temperature, it costs you something. Because you have to localize the particle and you don't get inserted with the pistol because you do reduce the uncertainty in precision to increase the kinetic energy. So because of the insertion of the pistol, when you do this operation costs you something. The overall balance of energy is the same. And this is a good question. Okay. Of course, did you say that with the error in the measurement you have to sometimes expand and sometimes compress? Yeah, because suppose that error means that the particle is here, but you believe that it is here. So your protocol is that I believe that it is here. So I expand in this direction and but no, the particle is here, so I'm compressing. You will see it next. So that's it. It's a question that you don't know with some maybe very small probability you mistake. So you are pushing, you believe that you are expanding but no, you are compressing. Some kid is insist, no, but in the very first moment when you are pushing, you notice that you are compressing. So the pushing is itself a measurement. Okay, there are many criticisms and many weak points in the in the sealer engine. And actually, the people don't like it very much but I can tell you, and this is a, this is just for the skeptical people that the sealer engine can be implemented in many systems. For instance, you can take a Brownian particle in a potential, you do this, this operation, you rise the barrier, you measure where the particle is and lower the way where the particle is, then you remove the barrier and go back here. And if you do this and you do the calculation of the work, the work, you extract, you extract, so the only, the only important ingredient in the sealer engine, besides these details of the barrier and so on is, look, you create the symmetry breaking, you create, you force the system to move either to left or to right. You measure what is the decision that the system has taken and you measure and then you go back to the origin by using this information. And with these two ingredients, a symmetry breaking that forces the system to adopt one of the two possibilities. Measurement, well three, and a smart protocol that uses this information to go back to the original state, you can extract Kilo. And this is the amazing thing after my information that there are universal results like this one, like if you have a symmetry breaking with one half, one half, you get Kilo. Yeah, you got it, I mean, so this sealer engine for example, we talked about this. Yeah, yeah, this has been done, well, I think the first ones who did it was Edgar, no? You were the second third. You were the others before us. No, the first sealer engine we set up. I think they were in the Japanese group before us. No, but this was not the sealer, this was... Ah, then it was us, yeah. Yeah, it's equal. Ours was also very genuine because we didn't do the whole thing, we did it half, and then we said, well, we... We used this two halves to say, but the first one is that John has died, I think John has died, I'm just explaining it. Yeah, yeah, it's bigger room. Oh, yeah, yeah, yeah, yeah. And something that is also interesting, this is the paper, no paper in 2001, that you can even do it with macroscopic systems, you don't need, this is a single molecule, this is a random particle, which is micro in the sense that it has two equations. And you can do it even with a system, which is macroscopic, you can take a sealer engine, which is an easy model, you know it's a model from a statistical analysis and model of little magnets, no? And you can do the easy model has something more symmetry-making, so if you increase the temperature or you increase the coupling between spins, yeah, we do everything is isocherma, so we increase the coupling between spins, you use symmetry-making, but it's a macroscopic symmetry-making, the magnetization of the whole system, it's a model of the magnet, so you increase the coupling between spins and the system acquires a non-zero spontaneous magnetization, which can be positive or negative, so there is a symmetry-making, so you are forcing the system to choose up positive or negative. When you do that, you measure the, here it says measurement, you measure, you measure, how can I get rid of this? Let me see, how can I get rid of that? It's a downstream project, so, but it pops up every time somebody sends a message. Ah, maybe just to- Okay, don't send messages now. Yeah, yeah, okay. Blanks, yes. Don't send polite messages, just to rephrase, to know which direction the piston needs to move, okay, yeah. So don't be polite, online people. Where is, and now why, ah, no. Okay, measurements, yeah, measurements. So you measure and depending on the measurement, you go back to the original system, the original state, using this measurement. Actually, what you do is to avoid the critical point and you need to measure the magnetization.  And this is very interesting because it tells you that the quantity that you have to measure doesn't need to be microscopic. It needs to be the result of a fluctuation that can be macro, meso, or micro. It can be whatever, the scale is not different. And the energy that you extract in the case of this model doesn't scale in the system size? No, it's always the case below. It scales with the number of symmetry making a loop coming in. And if there are only two, yeah.  You extract that my answer is that no, it is not right because why not? Because here you can repeat the cycle many times. So you can systematically extract KT of two, KT of two. And if you do it 10 to 20 times, you extract. And at the end of the day, you extract, ah, and now. So this objection is, maybe it's true for practical reasons, I mean, nobody wants to, nobody thinks that the C-L-R-N, you know, the mass will be able to solve problems of it. And then the energetic problems of society. But it's true that conceptually, you can extract, you can beat the second law, the systematic way. So you can do the same just during the temperature. Well, temperature is more, most of the thermodynamic of information is with isothermal process for historical reasons also, because it's simpler and so on. You can also, and look, we're talking all the time, we extract KT of two, so there is a temperature. KT is the temperature, so we fix the temperature. Okay, so this is the C-L-R-N-G, 1912. And everybody, ah, why this is much easier to, why people prefer this, even though we have all these problems with the piston and the, it's actually not real problems because you can implement the C-L-R-N-G with everything. Why people prefer the C-L-R-N-G rather than the original mass of the demon? Well, because it's here, the measurement is very, very clean. You measure just in a single instant of time. You measure in one of the stages of the process. The maximum demon has to measure all the time, where is the particle, where is the particle? And open and close. The quantity that you measure is very easy. The binary measurement is 0, 1, left, right. Yes, no, it's a binary measurement. And the maximum demon has to measure the velocity, the position in one side, in the other side, and so on. So it's much, and the operation is also much more clear. The maximum demon has to open and close and that. And here is the, in a single cycle, you have a single measurement and a single operation. That's it. So it's much cleaner. And then people can do theory with this much easier. Okay. So in the 1970s, in the 1970s, there were a completely kind of revolution in this problem. And the reason is the two people, Rob Landauer and Charles Bennett. Rob Landauer was at, the both were at IBM. Bennett Landauer was a big guy in electronics and Landauer at that time maybe was a post or something. But then he became one of the leaders of quantum information. If there is an overpricing quantum information, I think, Charles Bennett. So Landauer and Bennett were in the same corridor in IBM. So they, Landauer first introduced what it is called Landauer's principle. Probably, we'll talk about it because it has that experience on Landauer. And Landauer's principles means, well, there are some confusion, that maybe you have to hear about it, is that some operations with information require some energy or some, they have some limit. Thermodynamics imposes some limitations to logical information process. And I illustrated this with a case which is the simplest case. People saved with a process. The process is the following. You have a, no, you have a classical beat. So you have it in your hard drive and so on. You have each note that you have a hard drive which stores beats, stores zeros or one. So you have a physical system. You want to have a memory. It doesn't matter if it is a memory which is a magnetic or the brain or biological or whatever. The minimal, what you need to store energy is that you have a system that adopts two states. One state, we call it zero and the other state. These are meso states or macroscopic states. Okay, excuse me, I'm lost. Ah, my computer. Okay, so you have a system, you have a system and for the system to store information, you need two states. This is something that we are going to discuss all the time. Well, in modern computers, some of these states are dynamic. For instance, in, I think in, in SD cards, no, in SD cards, they are dynamic. They are dynamical, you need energy, you need a battery. Okay, they must be like that. In the CPU is dynamical. So zero is a current in one direction and one is in another direction or zero is current. Zero is no current, one is current. But in the hard drives and in the passive memories, you need that the system that adopts for each beach adopts two states, zero and one. So, and now consider the following processes. You have your memory, your memory can be in any of the two states and you do, you call it a eraser and many people call it a eraser. I have a full set, call it over writing because it's really over writing. You have something that can be in zero one and you manipulate this memory to force it to be at zero. It doesn't matter the starting initial condition, you go to zero. This is called restore to zero. And I think it's more some people call it a eraser but you can erase many ways.  If it is the magnet, you can heat up and cool down. And then when you heat up goes to zero magnetization when you cool down it goes to zero one at a time. So this is more over writing. If you want something which is unknown and you can overwrite a given bit. Okay. So now I thought that if this is implemented in a physical system and each of these states occupy a volume in the face space, the face space is the space of all the microstates. I don't know if you remember from statistical mechanics that the entropy is the volume of microstates compared to the microstates. So here I have my system can explore all these microstates. The microstates compared to zero and compared to one. And now I'm forcing the system to adopt one of these. We'll only occupy this small volume. The volume in face space. So the volume shrinks by a factor of two. Here I can occupy all these. And... So if the volume shrinks by a factor of two, if you remember the formula of entropy which is in Wolfman's grave, now it's K log, the volume. Log. If the volume goes from in the process, but the volume is in the Wolfman grave, but here we use that as the volume of the microstates. The entropy, the entropy is K log, the volume, and here is K log, the volume of the microstates. So this is before and this is after. So you can use the property of the microstates. Of the logarithms and see that the entropy has decreased by the quantity K log. So, yeah. Are we considering a connection of bits or just one? That's one. So this is that one that you can consider. Okay. And then the system. So remember that the system was this one? No. No one. No one.  So the system is, you have decreased the entropy of the, you have decreased the entropy of the system. So at the end of the day of the universe kind of decreased, you have to compensate this. How do you compensate? How do you create entropy in the universe by dissipating? So you dissipate T and you remember the increment of entropy in a T, but it's either I like T. Or if you want to have an increment of entropy, K log two, you need to dissipate KT log T. So by, if you want to implement this operation, this overwriting, you have to dissipate KT log T. And this is Landau's principle. This is Landau's principle. Okay, you have it here and there. But you have to dissipate KT log T. There is some confusion because people think that the process is irreversible. No, the process is not irreversible. The process is reversible in the physical terms. So the entropy of the universe doesn't change. Precisely what you do is to compensate the, compensate the decrease of entropy due to the shrinking of the phase space by creating entropy in the, the double principle is the same if you consider a conflict. There is a lot of work on quantum Landau. How do you do this? Well, there are a lot of work, but the problem with Landau needs a bath, needs a thermal bath. And in quantum info, you know that if you have a bath, you don't have quantum info anymore. Because if you have a bath, the system that you're analyzing in the eigenbasis of the Hamiltonian and then you have classical bits. So temperature and quantum info, they are enemies. But there, of course, there can be some compromise starting this type of thing. But essentially, yeah, temperature is crucial because and that would tell you that they would dissipate and it's 80 log P, so it is T is temperature. Temperature is zero, although for zero temperature is this classical systems are very, that's for technical reason. If this is isolated, you cannot do this isolated system because this is the real fair, the real fair about the concept, the volume must be different. So we need to connect this to something. If you connect this to something at zero temperature, zero temperature is tricky because zero temperature means that you put a tiny amount of energy in the bath and the HP increases. So, okay, so what has to do this well? First, notice that we have kt of two. This kt of two appears appearing in the Maxwell table and appears here. In the, before we had a nice series of conferences which was called kt of two. Because kt of two is like the essential thing of essential quantity that in quantum information. So it's a coincidence that there is kt of two here and kt of two in the Maxwell demon, okay, in the Celeronian. So this is what Bennett realized it. That there is a relationship between the two. And actually he came up with an idea for the Celeronian, which is very interesting. So he proved, you remember the Celeronian, the Celeronian, here is both, you have the gas. And I can explain it with the, so here you have to measure, no? So Bennett and people didn't know where the energy, so you extract work kt of two. So restore the second law, something in the universe must compensate please. Here you are extracting energy from the thermal bath. So the energy of the universe is decreasing, no? So Bennett realizes that people thought until the seventies that the measurement cost energy for the demon. And there was a kind of consensus although no one proved it completely. So Bennett thought, well maybe Landau's principle has something to do with here because the demon is the physical system and if the demon is a physical system, the demon has the memory and when the demon measures his memory, which can be zero one or left, in this case, left, right, his memory registers the state of the particle. And then to really go back to the, to really go back to the original state, he has to erase this information. And by erasing this information, because of Landau's principle, the demon has to dissipate kt of two. Or is that the worst? He has to spend the work. So this was the Bennett's idea when it's solution to the Maxwell demon. Okay, how do you restore the, in this cycle, the second law, you have to dissipate, remember that this energy comes from the bath. So you have to dissipate this back to back. So one answer is, well, I'm measuring measurement cost. But Bennett realizes that you can, actually you can split the cost between measurement and erasure. So the second law is restored because the demon has to forget what he has measured, which is kind of a shopping. But this was Bennett's idea. And this was a completely, a complete, complete change of viewpoints. So the thermodynamic cost can be due to erasure and can be equal to both. Here I have an explanation of two examples. Depending on the nature of the memory of the demo, the cost can be in the erasure or in the measurement. But I would not spend this in detail. This is, it's all the time, a question of how the volume of this changes in the memory of the demo. Okay, so to finish, just a few words on experimentalizations, but I think John will give you this. This is our paper with health guards and other friends, Minyaki Martini, Dimitri Petrov, who passed away. This was an experiment done at ITFO in Barcelona with optical tweezers. And it was a particle. And the idea was to take two optical tweezers. You know what this is, optical tweezers. It's something that tracks particles. And you have two traps and you separate them. So the particle has to make a choice. Either go left or right, like in the zero. And we managed to do this by tuning the probability. So we could make the choice like one half, one half or whatever, P one minus P. And then this is a plot of the potential in time. And this is a trajectory. So the particle here, these are the wells of the potential node. Here is the two traps are together. And here we separate the traps. This is position and this is time. Here we separate the traps and here we put the traps together again. And the particle has to make a choice. Left, right. And we could, this is the Cillar Engine, essentially. Once you mess it, okay. This is another, this is the Japanese people who is not really a Cillar. This is more a Maxwell Demo. This is a very simple Maxwell Demo. If you have a brown and particle, you know that the brown and particle exhibits fluctuations. No, if it is in a gravitational field, it exhibits also fluctuation. The tendency is to go down. But by fluctuations from time to time, it can go up. So suppose that it can go up and then you put some obstacle here.  And so you are lifting the particle with zero energy because it doesn't cause any energy to the particle. This is a ratchet action. I have an open experiment with the optical vision. Like I don't see why do you have to measure it there? I mean, you don't know. Here you have to open because this is not the Cillar Engine. Here we just do like that. For the Cillar Engine, you have to do the following. You have to do like that. Then measure where it is, then lower this energy and then go back like that. Yeah, so in this protocol, it doesn't matter. No, if this protocol is not there, this protocol was the one that we realized. As I said before, this is not the Cillar Engine. You have to put together this part with another part, which is different. So we made it by parts, but not the whole Cillar Engine. Okay, so it's not the whole protocol. This is not the protocol. So we never did it, but we put together, actually we did it in the paper, no, we put together the protocol experiment and the protocol experiment. And this was the Cillar Engine. But we were honest, no?  No, because at that time, we were interested, not the paper has not Cillar Engine in the title. We were interested in the energetics of the symmetry break. This is this part and the symmetry, this is the symmetry break here and this is the restoration of the symmetry. So we were interested in that. Okay, I think, okay, so this is an overview of the history of the theoretical information before we came with a more, it's very qualitative, you see there are more, there are some formulas like that now, but in the last 10 years or 15 years, we used fluctuation theorems that I think somebody has, I mean, we tried to do a more qualitative, more systematic approach. I mean, then they say that what we are doing in the last 10 years is just trying to understand Charles Bennett's papers because Bennett was like very qualitative and essentially he said everything that could be said. We were just generalizing these cases like exercise and you have an error and so on. And this is what I will try to explain in the next, I will make a break now and we will try to, so we will try to make all these things more quantitative and more general, okay? And in order to do this, we essentially, I like to split the migraine of information into two parts. One is trying to do the most important conceptual one and the mental one is to see how, if we can restore the second law, how we restore the second law by considering the physical nature of the demo. This is what Bennett tried and so on. But before doing that, which is of course the final goal, it's also interesting to see the Maxwell demon as trying to understand the Maxwell demon as an exchange between information and interest. For instance, we can just try to reformulate the second law by incorporating information, trying to optimize Maxwell demons and so on. So these are the two tasks. Today we are going to work on this and tomorrow we will work on this, alright? Okay, so let's make a break for five minutes and then we can continue, okay? Thank you very much, one, two, five minutes. The social systems and all that. Yes, yes, yes, yes. Oh, please, I have to put my foot here. Yes, yes, yes. Why do you need reversibility in the protocol? That's something I've been doing. And what's your name? In the SILA engine? The protocol is reversible, because it's not a free station. And in the other protocol, in the RAG, you also have to understand that the process can be reversed. Well, because let's say this is the best of the cases. It can be reversed, so it can be much more dissipated. Okay, it's like you're trying to find the minimum dissipation. Okay, so the minimum dissipation is a product that is reversible.  Because yes, well, let's say this is not explained in the code, but because... My problem is that why do you need this? Because it's well done. Well, we know that as much as possible it can be reversed and dissipated. No, no, no, no, no. So, it's always the same. It's true that this is not explained in the code, but let's say it's... Yes, yes. When you have seven reversibilities, it's a secret, right? Yes, yes. You have to pay for it. But it's put it outside. And I don't understand why, I mean, the process of saying it I understand it better, because it's more physical. I understand the adiabatic expansion, but I don't understand why you say that the other one can be reversible. Or the one of, sorry, the one of L.E.R.E. and the one of... When you reduce the space from zero to one to zero, which has been said that this process can also be reversible. Yes, of course, it can be reversible, because if you shoot it, it can be reversible. Yes, but what does it mean to be reversible? I don't understand it. It depends on the physical nature of the memory, but if you have a... I don't know. If you have this, for example, and this is your memory, how is the calendar? This is zero, this is one. The calendar is made like this. It's the same where the particle is, you press it down. And then you can do this. And this can be done quickly, so that the probability of being able to read it is also possible. And then for the elements, when they are visible, they are not visible. Okay. Yes. Okay. Okay. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. I can't. The data is yours. But the coffee break? No, it's not. The largest is the coffee break. No, no, no. The data is yours. No, no, no. The data is not yours. No, no. Okay. Which means the data is yours. You mean the two are the same? Two are the same. True. But when you have the stopping time, no? You have the stopping time, and I usually don't see that. You have the same thing? I agree. You could say the same thing here. I agree with you. Okay. Then here, the data is exactly the same. Sure. Okay, so this is not an hypothesis. This is not a complication. Sure. Because when I read, I have the thing that is in the hypothesis. Yeah, we can say it's the way we explain. We are breaking state. No, it's perfect. Okay, I agree. I agree. I agree. I agree. I agree. I agree. I agree. I agree. I agree. I agree. I agree. I disagree. Okay. I agree. I agree.  So, the problem is that if I don't use it, I cannot share the screen, no? I need the break in my two hours. No, because I forgot the coffee break. So, now when I'm... One second, I must look at 11.30 or... Because we already had a coffee break or there will be another coffee break. I must look at the program that I sent to... The program that I sent to Andre. Andre is supposed to start at 12. No, no, no, no, no. This is your chance. Andre will start at 11.30. So, you must stop at 11.30. But this afternoon, you can explain when you want. You want to finish at 7.00? Okay, okay. But no, it's 11.30. And then there's no way. But by the way, this afternoon, if you want to explain, you have all time. Yeah. You can speak all the night. Okay, no. In half an hour, I will try to... As I said, the medical information tries to do more systematic, quantitative approach to these programs that we discussed our before. So, I will give you just the new tools to do the exercises for this evening and to understand a bit how we solve these problems. So, we have to do... We have to present some concepts and tools from information theory and some from thermodynamics. And maybe this is very easy for, or trivial for, or known for many people, but I... Here you have it from real, from scratch. And, okay, information, you know, information theory was started by Klof Shannon. He wrote papers in 1948, so it's not so old. In 1948, they were called Mathematical Theory of Communication. So, he didn't use the name information theory. He used the name communication theory because the theory was intended first to analyze communication. He was in Bell Labs. Well, in Bell Labs, they had everything. They did everything. But, well, he was working on communication problems. So, the first concept that he defined in these papers is what it is called Shannon uncertainty or Shannon entry, which is something that is defined for any random variable, have a random variable. I will use rho and x, but I will assume that these are discrete random variables. This sum runs over a discrete set of numbers. And, on a roll of rho, I think many of us must be familiar for everybody. And this is called Shannon entry. You were talking this story that why Shannon called this entity. And it should be called uncertainty or ignorance. But Shannon tells that he asked for no man how to call this out this object. And one man said, no, you have to call it entropy first because already gives you this formula for entropy. And second, because nobody understands what is entropy. So, you will be safe in any discussion. But then Shannon said that it is not that he may have invented this story. It's strange nobody knows it. Anyway, this is the, this is the definition in computer science and so on. Here, the log could be log natural log or could be also a log in base two in computer science they use low in base two, and then although this is dimensionless. The unit that comes out when you use log two is bits. And you use natural logarithms. It's usually called nuts. You can have one bit is point something nuts. Maybe one thing to stress. We're spending about the, and our, that log is natural. Yeah, yeah, sorry. When I, before in the Maxwell be in the surrounding that this was natural. Yeah, 0.69. The one bit is 0.6. And because we are going to do physics, you can also do multiply this by Boxman constant. And you use natural logarithms. Then this has units of entropy. We are used by my Kelvin. Well, energy divided by temperature. This is dimensionless. So here is the dimensions are constant. And this is called gives the entropy or thermodynamic entropy and you see that that these two are the same object. But here we information theory. The notation is useful to express the entropy as a function of the random variable capital X is the random variable. And you can also have H of row. And it sometimes is expressed in terms of flow. Also, And if X is a continuous variable, like in thermodynamics many times, this is not in my microstate state. You can replace this by interest. It's tricky because when you replace when X is continuous row has dimensions. So the law of a dimension of a quantity with dimension as always a negative constant. It's more, it's more tricky. We are going to just work with variables and very simple variables in the exercise. You have only X can be left right. In the sealer. So you have to calculate this in a very, very, very simple. Okay. So this is this is this measures the uncertainty or the ignorance of of of of this random bar. And it has a very specific, very specific interpretation. When you measure this in beats, this H is the average number of these two questions necessary to guess X. Oh, X is a random bar because that is, I don't know. And then everything so I have. I tell you it's a man or what am I European or. I asked, yes, no questions. And he has to answer. No. And then finally, I. So this is the same, the entropy is the name, the number of just no questions that that I need to guess X. Since every just no question is a bit, I can call zero one is also the minimum, the minimal number of bits necessary to describe X. And this has to do with compression of files. It's there to how much can you compress a file where they were my brothers. They take this into account. This is the general interface always the minimum amount of bits that you need to describe something. Okay. This also is it becomes more interesting when you consider two variables. And this is actually one example is when you when I asked a question or what I measured something. So I got things of the celebrity. I asked a question. And then according to the answer I update my lips or I update my. So the uncertainty decreases. It's measured by the conditional answer. The conditional answer is defined like that is as well. If the answer is suppose this is a question, or a measurement for us, or some way I, why is giving it why is providing information about eggs to be the answer to a question they'll come to a measurement so on. So what is the uncertainty. If the answer is this one is just uncertainty of the conditional probability. Probability is my update. If I average over all possible outcomes. I get what it's called the conditional probability. The conditional probability is the average uncertainty of X after asking, or after I get why as information for it is how the answer, the new uncertain. What it is important is how much reduction of uncertainty. A question induces new environment and this is called mutual information. This is the information in some in some books. Just, you see that this is called information or channel information. This is not, this is not information. This is certain. And what it is information is this one, but it is information is this one. Why, because this is the information that why this is the uncertainty of X before I asked the question. This is the uncertainty of X after the after answering the question. And I do written books. So this is the, sorry. So, so the information is the reduction of uncertainty or the reaction. Remember that I give you an exercise of the all of your paradox. Why was it. It's was initially. To do is exactly this is between what is the theory and what don't open. So you can do this tonight by doing the exercise. When you can do it. And this is the information that the, the, the measurement or the question or whatever is by provides about things. It has very important property. Well, this is you put the formulas. And you get this formula for the information, which is completely symmetric for X and Y. And one first property, which is not trivial. In some books, they just put it as trivial because they start with this definition. I prefer to start with this definition. I think this is the most basic definition of movement. How much the answer that the ignorance is produced by methods. Okay, so this is symmetric. It's not trivial at the beginning you see this is not symmetric. You put the definitions of why and so on. It's a very simple exercise proof that it is a symmetric. If the two variables are independent. This means that the joint distribution. And even here in this definition, you remember the conditional probability is the reduction. Sorry, the conditional entropy is the entropy condition to why. But if they are independent, the condition X doesn't care about why so. Or in other words, if the answer my question randomly. Then the information provided by a random answer. And the last property is that if X is well. Okay, X is wide. Then, then, if, so if the answer that the term means we will create the X, then this is zero. We don't have any answer. We don't have any answer. Yeah, well, this is I put this formula like that, because because it is because it is easy to see from here but it is it is better to write the problem in this way. But if why is a function of X. This was me saying, I'm not free measurement. Or if it doesn't have any randomness. Or it doesn't lie. And the answer. And I asked. Then, then, if this happens, this is the same as this one. Then the mutual information is h y. This is this is more clear than the way you can do it is symmetric so you can do it. This is you can do the other way, but this is more clear that if because this is a error free method. F is one to one. No. But then if it is not one to one, if you fix the one to one, this is one to one. No. Okay, then if you fix the one, you have still an answer to X. No, you fix why you have them. No, in this case, what happens is that each one. No, it's the same, you write it like that. And this is zero. Yeah, yeah, yeah. This is the same to say that when you, when you, when there is an error free specimen, or when they put the answer to the question is, so whenever that's a lie. The information provided by the by the question is just the interview request. This is why also some people. This is this mistake, mistakes, the channel entropy for information, because the information provided by a question or by a measurement is there to feel the shadow of the other. But this is only for error free message. But in the, in the life is like the opposite. In case in which it can always lie. No, this case is when the, when the answer to the question determines the system. Why do I should have it. I should have written this. But because there was this formula and this formula was easy here. And from this formula is not bad. But it is, it is the same because you can exchange it. So this afternoon you have to calculate this for the sealer ending with errors. Mutual information, this information is used also in, in, in communication theory, actually, communication channel. So this is the message in your phone. And this is a message in the center. So this tells you how your messages are distorted by. Okay, so this is a, this is. Mutual information. I want you to remember these three formula because they're important. This is what the most important ones, this one. How much the uncertainty of something is reduced when I measure. And this is going to be the key to express the second law when you have a measure, which is the case of the series. So when you measure the uncertainty, the entropy, which is going to be the thermodynamic entropy, the entropy of a system decreases. How much we see that the entropy of the measurement will decrease by. And this is also very important. This comes from the fact that row X, not row X is, is, is the, is the entropy of X, row Y, not row Y, you expand this law and you get X, Y, and this is also very important. When we consider the second task of information, which is to consider the physical nature of the demo. This will be the system and this will be the demo. And the motor information will be the correlation between the two. Okay, this is what we'll see this tomorrow. The age of X and Y is like the entropy of the joint distribution. Okay, this is all that you have to know of information theory was there are more things like relative entropy. Next week. I know for me to tell you. Okay. Okay. So you will have more. You can express this as a relative entry. There are many, many, but these two slides. Summarize this. If you, if you just write down this is enough for what they're going to say. Today we're going to use justice or remember how the entropy of something reduces when we measure something. In the case of the city, we have the particle can occupy the two sides of the window. So this has some answer that the position has some answer that you don't remember. And the particle can be here or here you don't know. And you measure. You know that it is on the left. Yeah, yeah, this is X, X, Y and X. Sorry, this mistake here. Yes. I did this. After some. This drink. I wrote this after some time. I will correct it. So it's, it's, it's a H. Remember that H is the number of bits I need to describe X. This is the number of bits I need to describe Y. This is the number of bits that I need to describe X and Y without taking into account correlations. And this is, if I describe both at the same time. So this is, I is the number of bits I save if I take into account correlations. Yeah, there are two mistakes. There is a class here and a watch. That is the correct one. It's another question. Yeah. Very, very quickly. Why are independent? What should the condition of the condition is just the HX is equal to HX. This is why they can't have it. When they are independent. Yeah. In order to know when X is a function of Y. I'm going to summarize this one. You don't need to know the F. No, it's a, it's a question of probability theory. You don't need to know the function. It's always reduced. Okay. This is a, but this is a good question. I think you don't know. Yeah, but in the game, in the game is true that you need to know. Yeah. I mean, in the game of yes, no questions. You need to know that. I mean, in the game of yes, no questions. You need to know that. Marie that one that who is the woman. When you take average is a random variable. You don't need the distribution of the first variable. Yeah. I mean, mathematically, the reduction is, is, is there. But yeah, too. No, but this, yeah, you need to know the function for instance in the city. This afternoon. You have an error in the measurement. Of course, the, the, the world and the probability of error is one. You would think it's like when you are right. What you will pay is that you can extract. Why, because a completely error function. If you know that it is, if you know that. So it is a, I think to, it's true mathematically you don't need the function. Because they, they, it's a probability calculation. But to implement protocols in dynamics or to solve the game of just no questions. You really need there. When you look for. Yeah. That's a good point. Okay, so I'm going to finish. So. These are the basic concepts of, of information theory. Now we have some basic concepts of. Okay. And this concept is work. We have to use some of them work. Work. And this afternoon, I will explain this or this afternoon, the project. In half an hour or so. I will tell you the basic concept of the dynamic. And the second of the money. And then we will do the. Okay. The online people has any questions. Please mute your microphone. No questions. Okay, great. So. See you then this afternoon. This is your computer. Hi. Hi. So. No, no, no, no, it's not good. So I can. Okay.


Hello there, I'm Paul Marshall, leader of West Sussex County Council, really excited today as I'm over at one of our sites being given demonstrations of the different techniques our highways team use to repair and improve our roads. As a council, we want to adopt the best practices to ensure our highways are kept to a good standard throughout the whole of the county. We're making significant investments in our road network. This year alone, we've invested an extra £14 million over and above our base budget to really deliver good quality outcomes and we're committed to making sure that this council can provide a good quality, safe highway for all users. Thank you.


The key thing that entrepreneurs do differently and maybe we're configured a bit differently than other people is that we see a reality that's not here today. We see it so vividly in our minds and we almost see it so vividly as if it's already happening. And I was running fast to make that happen. And some mentors basically said, hey, it's a bit like you're the bus driver and you've got everybody on the bus. You start taking a 90 degree turn on this bus and you're going 60 kilometers an hour, everybody's gonna fall out of the bus. Yep. And that was the risk that we really ran when all of this happened. So I really had to teach myself to go slow enough to have one major change out of time. And that's still a work in progress. 10 years later in having this business where I want to continue pushing, my nature is driving, it's impatient. Why can't this happen any sooner? What do we need to do to cut through the noise? Did you have any employees or team members that could not accept the adoption of these new systems? Yeah, for sure. When they left? Oh yeah, yeah. I think that, and I think that's good for both them and for us, right? So, and there's no judgment in that as well. So I think it's just always about fit. And I always thought about this as a, like fit should exist between your team members and it should also exist in the client agency relationship as well. And so if you have great fit, like you've been there, Amir, like where you work with people and some people are such a joy to work with. Yeah, now there's people who you wanna pull out your teeth. Yeah. And it's just, you know, when you find the right person, when you find the right who, life is such a joy. They can almost, they can pick up exactly where you're leaving things off and then they can run with it. They're alert, they're resourceful, they're easy to work with. And so when we, and we realized that that, like, you wanna take a mirror up and look at yourself as well. So there was every year, you know, I would do that as a year came to a close and say, who do we need to become? Who do I need to become personally to attract that kind of person into my life? Whether that was a key hire, a key client that I wanted, and even a reputation. I'd like, who do you need to go? What contribution do you need to make for that to be true? And- So how did that process look like? Was it just you looking off three hours at times, just thinking that pen and paper or? Yeah, I just basically go, I've got, I follow right now, what I do is I follow a process called year compass. Okay. And every year it's this, download this questionnaire, essentially.  What didn't work so well? What goals did I set that I hit? That I should celebrate? What's the site for this? yearcompass.com? Yeah, it's called yearcompass.co, I think. You're like Y.O. No, year. Oh, year compass. Year compass, yeah. And it's made by some guys in Europe. And it's really nice that they just kind of did this as a service to the world where you don't charge anything for it, you can print it out, you can do gatherings or parties of people where everybody does it together as a group. I do it introspective kind of on my own. And so that was one of the key processes that I used. There's that and then just asking questions about like how might I type questions? How might I improve our client service? How might I be of higher service to my team? How might I push my team in kind but gentle ways? And just like doing that and also getting feedback as well. So we put in a feedback loop, at first we used a system called Tiny Pulse. Oh, Tiny Pulse, yeah. And then, and now we use something called Office Vibe. And the idea is fairly simple. It's like, work happens on a day-to-day basis. You can typically look back on a week on a Friday and go, how do I feel about my week? What were highlights, what were the lowlights? And you should capture that and do it in a way where psychological safety is really important in teams. Like if teams trust each other, trust is the basis upon which everything else happens. Performance doesn't come without trust. And so, yeah, we put this in and we started measuring how happy and how engaged our teams are. And that what had to happen every week, right? It would just ask you different questions about engagement. And then we would run custom polls as well. So just to ask, like, okay, how are we doing about topic X or how am I doing as a CEO? What else should I be doing? If you were a CEO, what would you do instead? I love that question. And it's great. Like you just start seeing all these different things that people see from their own lens if they were in the SEO department, they would say something different than if they were in design or if they were working with clients, they would say ABC things and would just create ideas for where to go next.


integration and command and control to bear on our enemies. This course was designed so that no one competitor and no one attribute could prevail above and you guys were phenomenal. You know, I think we're just putting in our best effort from wherever happens. A lot of good people out here and a lot of new dudes that I haven't seen before at the community and all but did a lot of effort for this. This is something camaraderie here just being a lot of good news here. Readiness table and many events that we want to be able to fight tonight. Whistly Fality. This is a readiness center. The second thing that's important behind this is the validation that our training two days is giving us where we need to be to be ready to go. So we're doing night navigation so basically this is testing our skills at navigating through this rough terrain here in Texas and seeing if we can get all of our points in time. Basically this confirms that we're able to, you know, set our or make a plan, plot it on the map, get our heading, get the distance, keep your pace count and get to your position. Team effort from designing, implementing and testing the events. It really galvanized the 803rd OSS team and the Third Air Support Operations Group and really showcased what the Tactic family is all about. I pushed myself a lot harder than I had or than I would have if I was doing this stuff alone. Like I wouldn't have gotten a three hour, two hour, 30 minute runtime if Shen wasn't right behind me at my heels the entire 12 miles. So it's a blast with all this competition.


Welcome to Face Your X509 Fears, Automating Certificate Rotation for Clifandry. My name is Irina Shostava. I'm an engineer at Pivotal. I've been working for about a year on the CF Release Integration Team. And before that, I was anchoring the Crathop team. Welcome to the stock. So today's agenda will be a little intro to public key infrastructure, also known as PKI. We'll talk about why certificate rotation matters to you. Then we'll go over the sort of high-level algorithm for the rotation. Then we'll look at PKI in the wild with CF deployment, like a real-world PKI, followed by a short demo. I'll show you a real-world sort of pipeline that actually performs certificate rotation. And we'll conclude with the future of certificate rotation. So let's talk about public key infrastructure. In cryptography, PKI is an arrangement that binds public keys to their specific entities. These entities could be either people or organizations. And this binding is established through a process of issuing certificates by a certificate authority. So to sort of recap some of the terminology that I just presented to you, a digital certificate is a document that proves ownership of a public key. And it includes important information about the owner of this public key. Certificate authority is just an entity that can issue certificates. Another term that's used a lot in TLS context is X509. So X509 is just a standard defining a format for public keys. And this format is used to encode various information, and more specifically, the owner of the certificate, the expiry, the certificate authority, and so on. So in this example, we'll look at the certificate chain. And there will be a certificate chain used by Wikipedia. So on the slide, you'll see a root CA. And as you can see, highlighted in green, there is an issue in the subject, which are the same. And highlighted in orange is the fact that it is CA. That means that this is a certificate authority that has authority to issue certificates. Next up is the intermediate CA. So that's kind of the second link in this chain. You can see that the issue of the CA is just the root CA from the previous slide. And the subject is just the specific information about that entity. And again, you can see highlighted in orange that it is still a CA. So this certificate has authority to issue other certificates. And last in this chain is an example of a leave certificate. You can see again that the issuer is the intermediate CA from the previous slide. And the subject is just the Wikipedia.org site. And it no longer has an authority to issue any certificates because the CA property is set to false. So what is the role of certificates in modern distributed systems? And really, for the slide, I could have named it as role of TLS in modern distributed systems. But since certificates are so commonly used for TLS, more specifically, it's pretty much interchangeable. So imagine you have a distributed system where some components are talking to other components in various ways. And as of right now, the way I presented it to you, there are currently two problems with the system. And certificates will help us solve those problems. The first problem is that there is no privacy. So all the data is transmitted in the clear. And moreover, anybody on the network can eavesdrop and listen to the communication. To address this first problem, we can just say, let's encrypt all the traffic. And the naive approach to this would be to use the public key from the certificate and use asymmetric encryption for that. Then each server could decrypt the traffic with the private key that corresponds to the specific public key. Now, in practice, this approach actually ends up being computationally expensive. So it's not being used. And instead, in the case of TLS, asymmetric encryption is used only for the handshake part. And the rest of the traffic is encrypted with symmetric keys, which are established during the handshake. So again, here we see how certificates are used in establishing the handshake for encryption. So this gives us privacy, which is great. This is the first step to making the system secure. However, we still don't know who those servers are. So there's no authentication that is performed as of yet. And this presents a problem because you are vulnerable to the man in the middle attack, which means that somebody could pretend to be a server on the network. But in fact, they will have a malicious intent. And they could still be able to see traffic and decrypt the traffic because you're not verifying who you're talking to. And we can solve this problem as well with certificates if we perform certificate verification. In this case, let's say we're viewing the case of one-way TLS, a client who will verify that the certificate presented by the server is good, and that's done in two ways. First of all, you will do cryptographic verification where you will verify that the certificate is signed by an authority that you, in fact, trust. And in addition to that, it can perform other checks. So obviously, you will check certificate expiry and host name verification, and so on and so forth. So this gives us authenticity. And privacy and authenticity together give us TLS. So the TLS benefits and the power of TLS really comes from those two properties. So let's talk about why should you care about rotating your certificates. Or the obvious thing that comes to mind is that they tend to expire. I believe CF deployment certificates have a default expiry of one year. You can change it at, but it's really not the default setting. Credentials may be leaked or stolen. So in this case, you want to be able to react quickly. And hopefully, you'll have a process that is streamlined so that you can mitigate the risk of leaked or stolen credentials. And furthermore, you can go and take step two even further and just rotate often and go fast to mitigate that risk. Rotate often, even though you don't have credentials that are leaked or stolen or you don't have certificates that are expiring. Let's look at the PKI in the real world. So we have CF deployment, which is the bash manifest or the canonical bash manifest that we're using for deploying Cloud Foundry in the open source. And here's one example of a certificate authority that CF deployment uses. It's called Service CF Internal CA. And in this case, I'm including just two examples of certificates. There are, in fact, a lot more CC TLS and Blob Store TLS. And moreover, there are more of these certificate authorities in CF deployment. So pretty much every subsystem in this large distributed system is using its own sort of PKI. So there are about nine of them, and they all sign a various number of certificates. So again, you want to be able to rotate these certificates in a way that will not cause any downtime for you, hopefully. So what is the high level rotation algorithm? And here I should disclose a little caveat in that I've been pretty much using CAs and certificates interchangeably, but there is a difference in the algorithm in that certificates can be rotated in the single deploy where CAs require a three-step rotation. So I'm not going to really cover in this talk the certificate rotation, the leaf certificate rotation, because it's kind of like a simpler case of a C rotation. And instead, I'm going to focus on full rotation, so a C rotation. So step one would be to add a new CA. In this step, you would want to configure everything to trust both CAs and redeploy so that component trust stores are updated with these new CAs. Step number two, you would want to regenerate all of your certificates with new CA and then deploy again. And step number three, you want to remove the old CA. That's where you configure everything to only trust the new CA. So it's kind of the reverse of step one and redeploy. Why we need three steps for rotation? Why can you not do it all in one step? Well, the reason is that in a typical Bosch deploy, components get updated in a certain order. And really, some of the instances within instance groups have rules about how they get updated. For instance, there are canary instances and so on. So if you consider, for example, Diego API, which is also known as BBS, which is trying to talk to the service that it's using for locks, which is called LockIt. Both of these services are deployed together on a single VM and that VM has two instances. So you could imagine if you were trying to update CAs and certificates at the same time, you will end up with a situation where one of the VMs will have all the new stuff and one of the VMs will have all the old stuff and your high availability will be broken. So in fact, in this case, I believe Diego prevents you from that kind of situation by just failing to start up. So you will have a failed deployment in that case. All right, so implementing the algorithm, that's where we're gonna go and look at the real world pipeline. Let me update my displays. Okay, so this is the simple pipeline that incorporates the algorithm pretty much. This pipeline takes about an hour and a half to run end to end for a vanilla CF deployment. So I'm not gonna have you sit through that and I'll just show you the results. So as you can see, here's each concourse job that represents a specific step that we just looked at. Step one for adding new CAs, step two for regenerating certs, and step three for removing the old CAs. Now let's dive a little bit more into what each of these jobs does. So the step A kind of of the first step is to configure everything to trust both CAs. So this is done, unfortunately, currently there isn't really APIs for doing that out of the box. So I've built a little sort of glue code that I call the rotator. And you can, it's a command line tool that essentially will make the appropriate calls to credit up API as well as ensure that all the configuration is correct for the box director. So in this case you just say rotator add new CAs and it will find specifically root CAs to rotate. And as we saw, there are really nine of them so it will tell you that you'll regenerate nine CAs. Then you botched deploy and for botched deploy, I've used some of the release integration tools. We're providing a lot of tools to help you test Clifandry and one of those tools is called Uptimer. Uptimer helps you measure obviously Uptime during deploys. So here I really wanted to show that what kind of downtime we're gonna be seeing throughout the rotation. I'm gonna scroll here for a bit because there's a lot of output. So try not to pay attention. Okay, so the important part comes here where the deployment is finished and Uptimer prints out this nice summary for the various measurement that it did throughout the deploy. HTTP availability is just testing your application routability, so can I send requests to my application still? And in this case we're seeing that the word FAC zero failed attempts out of about 2,000 attempts. At pushability there were about two failed attempts. At pushability is just an ability to run CF push out of about 34. And furthermore it checks whether you can retrieve logs or stream logs and there are about six in one of them accordingly and really this is all within the threshold so you can really reach zero downtime in terms of CF API and log API components but it's still within threshold, it's still pretty minimal if you look at the number of attempts. Okay, let's also look at the second step. Similarly here we need to regenerate certs so we're gonna ask Rotator to do that. Regenerate all the certs for us. And for a Bosch deploy I will also just show you the Uptimer summary where we're seeing that there really is zero failed attempts to perform. Get requests and in this case it even had zero downtime when it comes to CF push, which is pretty amazing. And step three is very similar. I'm gonna skip the Rotator step because I think it's pretty obvious but let's again look at the Uptimer summary and again we're seeing that there is very minimal downtime in terms of CF API and practically zero downtime when it comes to HTTP availability. I should also say that zero downtime is a little bit of an overloaded term. This obviously is a subject to the precision of your tools so in this case we can just kind of estimate in terms of the number of attempts that are being made and the number of successes. So let's talk about the role of each component in that implementation. So to start with we have CredHub that is our secure storage of CAs and certificates. It also has some convenient APIs for regenerating these certificates and more specifically regenerating certificates signed by a certain CA. If you can do them in bulk you don't have to do individual calls. Then of course we have Bosch. Bosch is a great tool that helps us have repeatable deploys and in this case it obviously handles deploys as well as integrates with CredHub to retrieve all the latest credentials. So we're really utilizing that CredHub Bosch integration which is very important. Rotato, this is the glue code that I was telling you about and it really does kind of two things. I make calls to CredHub API to regenerate these credentials as well as it will create these concatenated and unconcatenate CAs in CredHub and CA concatenation is really like more of a standard practice when it comes to trusting multiple CAs at the same time. And of course there's concourse which helps us build pipelines and automate all the things. There's definitely benefits to the current implementation. For starters it's completely automated which is really awesome. Because it's automated it's a lot less error prone. You no longer have to deal with this manual process of CA rotation. We saw that there was zero application downtime. You don't have to worry about incurring a downtime when you're rotating your certificates. And there was pretty minimal CF API downtime. So where's the future of certificate rotation? I hope that most of the glue code that currently exists will eventually exist in Bosch and that specifically comes to that configuring CAs to trust, configuring components to trust multiple CAs. So that would be concatenation of CAs. There is kind of like more in the future is automating certificate rotation for the Bosch director itself. Where we're seeing is that the Bosch director is kind of improving its security posture as well adding more TLS to various interactions between the agent and the director. And at some point we will need to solve that problem as well in the way that could be automated than not causing you downtime for your deployments. Okay so in conclusion we've learned that certs are an important part of a distributed system or I should say of a secure distributed system. And rotating certificates is also very important. We've learned the algorithm for CRotation that could be done in three simple steps. We also saw that using automation we can make that CRotation frequent and reliable. And all together the combination of Bosch, concourse and credit can really make certificate rotation easy and more streamlined. I'm including some resources here. So the code and obviously CF deployment and CF deployment concourse tasks in case you're interested. But that is it, any questions? I want to point out on the technical note that you can throw away the whole CF internal CA and all its certificates and just deploy and it works. So no jobs in Cloud Foundry will refuse to start up. If the certificates will not match the one of the others they only will stop starting up if the CA certificate they have locally doesn't match the client certs it has available locally. We had that case in January when we had some minor issue during rotation when we found out that the CA certificates the Bosch CLI creates are not compatible with the client certs credit will generate for them. Interesting. Okay, that's interesting. I haven't tried that particularly but I have tried in fact rotating all CA's and certificates in one step and you will end up with a failed deployment. But I haven't tried doing them piecewise. So perhaps that works. Have you considered rotating client certificates as well? By that I mean we plan to allow customers to have their own certificates which we get from services like Let's Encrypt and we plan to store them in Crathub. So the problem currently that we face is that we don't get notified when one of them expires or is going to expire which happens very frequently with those like every 90 days or so and currently there's no solution for us except checking once per day and asking Crathub. Yeah, so the algorithm that I've described will work for both the mutual TLS and one way TLS. Most of the Clifandry CA's are really kind of stored in Crathub and they're only used internally but it should work for mutual TLS as well if you use that same algorithm. Okay, thanks. Does it work for Pivotal Cloud Foundry? Your pipeline? I do not know. I've only tried CF deployment kits. Okay, then thank you. If there are no other questions and have a nice coming home to this evening and see you next year in Pennsylvania.