So, but Nakamoto's protocol initially wanted to solve as kind of very concrete. So the initial motivation was implementing, well, the accounting of money transaction. So the initial problem was that Alice wants to transfer some money to Bob, but yes, somebody has to do the accounting, right? And if you don't want to trust a single entity, then you have to implement such a ledger, as it's called, well, in a distributed manner. And Nakamoto's protocol, as we have seen also in the previous talk, is one method to achieve this. So it's not surprising then that people started to think about what is actually the service that Bitcoin can export to applications to higher level protocols. And so actually what functionality does Bitcoin achieve? So if you want to specify this book here as a functionality, then what does it, how should it look like? So roughly, so what you can find in the literature is basically that, well, the basic structure of such a ledger functionality, it's a chain of blocks. And each block has some content. So as we have seen, simple transactions, so Alice transfers some money, well, in reality these are addresses, so it's not really Alice, it's Alice address, source and destination. But also one could think about to have complex contracts in there, so-called smart contracts, and everything is listed in these blocks, right? So what are the properties that you often hear about? Well, the content is, sorry, the content is provided by anyone that submits such a transactional contract with sufficient funds. So Alice can decide, well, I transfer this money to Bob, she can even say I have an entire contract that depends on the time and given that Bob does this, I do that. And well, the second property that one is interested is that anyone can read this state, so it's public. You can just say what's the state of this ledger and you can just see how much money a certain address has. And probably the most interesting property is that even an adversary cannot modify what's already in there. So it's immutable, it's written in stone, what's written in the ledger. And as a third, fourth property, one, such a ledger functionality is typically connected to a clock to reason about speeds or how much blocks show up over time. And this is typically found in the literature, such specification. So why do we want such functionality? Well, it's nice to assume it, such that you can design an application around it and then assume these ideal properties to conclude the security of your application. And it's also nice to have such functionality because you can work in a composable framework and get, kind of assume this as a hybrid functionality and use it. Well, let me just give one example, so I will quickly go into these two points. So for example, one application that is actually very nice, so briefly the idea for now. So imagine these people want to compute some MPC protocol. So now, what is the nice thing here? So instead of sending the messages directly to each other, well, they submit something to the ledger functionality. And what they submit this, in each round of this synchronous protocol, they submit their next protocol message. But we've attached with a fund.   So if this protocol message of your current round is correct, and doesn't lead to an abort, for example, then you will receive your money back. Of course, this requires some form of public identifiability, for example, MPC with identifier abort. This has been, for example, worked out in KIA SEDAL in a recent work. And so this honest behavior is kind of punished, and honest behavior is encouraged. So even worse for Eve, if this protocol message that she submitted before led to an abort, she will be identified and not receive her money back. Even worse, for her and even better, for the honest guys, they will receive kind of her deposit, and this kind of favors honest behavior. So let me quickly go into the second point. So we would like to have a functionality to use, to follow this modular approach. So we quickly discussed before this number two here, namely that we assume a retro functionality can create an application, but we also need the first step. So how do we get the retro functionality? And they should rather be the same, so what we assumed here should be one that we can actually get. For example, from a random oracle, and a clock, and a network. And this is the problem which we address in this talk. So they should be the same, otherwise we have a mismatch and cannot really use it. So what are two strong properties that appeared? Well, an over-idealization of Bitcoin was, for example, that also made the transaction would make it to the next block. That's in the case of an almighty adversary, this cannot hold. So the lecture state extends in fixed time intervals. But the influence of an attack to this can also not really be. Third, that everyone sees the same state, as one would maybe intuitively think, can also not be guaranteed, maybe they see a similar state, but one sees maybe a prefix of the other, but not everyone sees the same state. And what we also have to consider is what is the influence of an adversary? We have to allow the adversary to influence the lecture and how it behaves. More than, for example, just that he can create own transactions or permute the list of transactions. So the roadmap for the rest of this talk is we would like to define a lecture functionality which is realizable by the Bitcoin backbone protocol. The questions we have to consider, so important questions, are, for example, so which transactions are part of the next block? Or when is the next block inserted into the state? Which part of the state, to honest part, is seen and what is the adversarial influence on the state itself? These are the questions we will answer in the following. So let's start now with the description of the lecture functionality that we define in the paper. So first of all, parties can input values, well, think of transactions, and they are, they run through a so-called validate predicate and are inserted into a buffer. Here, validate is a lecture specific validation check. Think of, does Alice have sufficient funds to transfer this money to ball? So validate gets as input, for example, the state of the lecture, the transaction, and decides, is this transaction valid? If yes, it goes into the buffer and stays there for a while. So let's jump to the more interesting setting, state updates. So as I said before, the lecture does not just proceed by itself. There has to be some influence that the adversary can have on this update. So how do we model that? So there is Eve. Well, she can propose the next block. So this sounds now a bit too much, right? So it's just a proposal. This proposal, this is not the next block that goes into the state. It will be run again for a lecture specific procedure, which we call extend policy. So what is extend policy? So this next block proposal is evaluated if it complies with the standards, with the policy that the lecture defines. So this is a lecture specific parameter, and at the same time it complies with forcing mechanism. So this blueprint, so to speak, what you see here is a very general class of lectures that you can now instantiate by giving concrete procedures, for example, policy and validate. For example, in Bitcoin, so let's discuss Bitcoin. So to recall, the input to extend policy is the next block. So the proposal of the adversary, debuffer, the time, for example, and it produces an x-block. The invariant of this extend policy procedure is that if the adversary complies with the standards or with the policy of the lecture, then its proposal is really the next block that goes into the state. And if it doesn't comply with the policy of the lecture, this extend policy will enforce the default block going to the next state. And this default block will, of course, be compliant with the policy. So in Bitcoin, this will remind you of the properties that have appeared in the literature. So the extend policy of Bitcoin can say, well, we enforce a minimal chain growth. So if the adversary says, well, don't extend the chain, then at some point, extend policy starts producing blocks on its own. We can enforce chain quality, for example, which means that not too many blocks can have as their owner a dishonest party, for example. And we can also enforce a weak transaction liveness, which means that all transactions that wait in the buffer for too long, they aren't forced to go into the next state block. And hence, we have some weak transaction liveness, which can be amplified, for example, by adding signatures to the paper. So let's continue to the third question. So what state, which part of the state to honest parties actually see? So when Alice wants to read the state of the ledger, I told you before that it's kind of too strong that she just gets the entire state to see. So what is the influence of the adversary there? The adversary can, when Alice wants to read the state, Eve can define a pointer into this state here, with the fact that Alice gets this prefix of the state. So this again seems a bit too strong, so there is a restriction on how this pointer here can be defined. The restriction is that this pointer cannot be too far away from the head of the state, and it can only move forward, that's all. So if Alice reads the state, she will get some prefix of the state, which is, she can be sure that it's not, the state is not much longer than what she can see, and she will only see increasing sequences. And let me mention a last point. So I also said that the ledger doesn't just proceed alone, but it's also important in a framework like UCS that a functionality has to receive activations to work. So there are special, in the ideal world, there are special, let's say dummy inputs, dummy commands, which we call maintain ledger, and whether the ledger proceeds in terms of time, so in terms of this clock functionality, also depends on the number of queries it can get. And if you get only a few queries, it proceeds lower than, it gets a lot of queries. And so the punchline here is that the ledger functionality itself, depending on the activations it gets, can influence the speed of this clock. So to sum up, this is the blueprint of the ledger functionality we put forward in our paper. We have modeled the influence of the adversary, and the parties, they can submit inputs, they can read the state, and they are assured that whatever they read, this points into a window that's too wide and starts at the head of the state. So this blue arrow means that Alice can read up to here, so on. And this window now slides, so as the state extends, through the extent mechanism I explained before, the parties move, kind of move with this window, and this gives kind of a sliding window view on this blockchain model. So that's kind of the summary of our ledger functionality. So how do we realize that? So the usual suspects here, we assume a couple of hybrid functionalities. A clock, of course, the random oracle, and the diffusion network. So it's not a broadcast network, it's kind of an ad hoc network where you can implement a multicast on top of it. And so what we then first did is to cast the backbone protocol as a synchronous UC protocol, following the synchrony model by Katz et al. And so in a nutshell, so the protocol proceeds in rounds. And each round we have to do this proof of work step, and you have to fetch the information so much the longest chain, what transactions came up, and so on. So we divided each round into two mini rounds to reflect this logical structure. So the mining protocol is roughly the protocol you saw in the previous talk. So in the first mini round, you fetch all the information from the network, new transactions, longest chain, and so on. In the second mini round, you try to extend your local longest chain. And if you found a longer chain, if you could extend it, you multicast this again over the network. At any time, remember that we want to realize such a ledger functionality, so the ledger state that the parties implement is defined to be the prefix of the longest local chain here. So then the main theorem, of course, again depends on some parameters we saw before. So we are in a setting with a fixed difficulty. You have the probability that you find the proof of work. You have the network delay. We have to quantify the honest mining power and the dishonest mining power. The honest mining power is quantified as a probability that at least one honest guy finds a proof of work in some round. And the dishonest mining power is quantified as the expected value of the number of proof of works that the adversary can find in one round. Then we can state the main theorem, so if this honest mining power and the dishonest mining power are apart, so which means the beta here is sufficiently bounded away from alpha and alpha is larger, according to this formula, then this mining protocol, the synchronous you see, ledger protocol with the concrete extent policy for Bitcoin, for the Bitcoin backbone, realizes this ledger functionality that we explained before, where you define the ledger state as the prefix of the longest local chain. So one nice thing in this proof is that the proof of work step could be distilled out as a modular sub-step. So the proof of work step, the first thing is to create a UC functionality that resembles a lottery. So what does this mean? So this lottery that the proof of work step implements, kind of very easy, each party can submit input and the lottery throws some coins and if it's accepted, then it's stored in the pool of accepted inputs. That's already it for this lottery functionality. And the nice observation is then that under these assumptions of the theorem, the honest parties have an advantage in winning this lottery over the dishonest parties. And this finally then leads to the consensus we already know about Bitcoin. So to sum up, we have seen that if you assume a ledger functionality for your application, you should not over-idealize what Bitcoin achieves. And what we now provided is an implementable ledger. So we specified it kind of a general class of ledgers and showed which concrete one the Bitcoin backpump protocol can realize. And this realizable ledger can now be used as the basis for proving applications. It can also be used as a basis for further analysis itself, for example, rational analysis. And this kind of extends what we already knew about Bitcoin. So we had property-based definitions and then proofs. Now we also know which functionality in a composable framework you can assume in a large application. So this concludes my talk and thank you for your attention.


What's up everybody, Jason here for Jaspy's CaseBase.com. We're gonna weigh three hip-pack spots away with this 2020 Panini Mosaic football hobby single-pack break number three random teams. And again guys, first we do the break, randomize because of our names, teams strip the hits out then at the end we'll randomize all 32 spots again with the original list and the top three get into the hip-pack break. So here we go, dice roll it, let's do the break first. Four to five, nine times, good luck. One, two, three, four, five, six, seven, eight, nine. Four to five, nine, nine, Eugene, done a 10, nine times, one, two, three, four, five, six, seven, eight, nine. Nine times, Texans out of the bucks. Again guys, stick to what you got, no trading, so we're just gonna quickly alphabetize it, strain it up, border it, print it out, so there's your teams there. Now let's switch scenes. Let's do the quick pack, just like football hobby. Maybe get a color, maybe get a nice rookie. Del Beckham, Lane Vanderish, Swagger, Pittman, Hervey, Justin Jefferson. Switched scenes now guys and again, three hip-hack spots being given away, $600 spots, roll. Six out of five, 11 times, good luck. One, two, three, four, five, six, seven, eight, nine, 10, 11. Boom, 11, 11, good luck guys, top three, get some hip-hacks, top three, top three, top three. It's missing almost canard bold unfortunately, not in all the way down to Eugene, but let's see who's in. Victor, Nick Oh and Tim Yu, congratulations. Top three are in, so you will be getting a hip-hack no matter what, guaranteed. And like I said, you just gotta sell X amount straight up, a couple more fillers guys and we can definitely get that going tomorrow guys. So appreciate it guys, jaspyscasebreaks.com.


So, in the same spirit I can do this other thing which is this two spheres now and again so ok let me just sketch the calculation is this clear ok. So, let me do this case of when I have these two large spheres. So, I have these two large spheres with their own excluded zones. And if I have if these approach close to one another there will be a common region the overlap volume which I need to calculate. So, let us say that these spheres are of radius r or both of these the small particles are of radius small r and let us say that the center to center distance between these two spheres let me write that as capital D. So, in what range of capital D will there be a force? So, there will be a force if D is of course, has to be larger than 2 r when the two spheres are touching and smaller than 2 r plus. And what will be the excluded volume? The volume that is excluded by these two large spheres is simply the fourth third y the excluded volume of each of these spheres r plus r whole cube there are two such spheres. So, 2 into 4 third pi r plus r whole cube minus whatever is the overlap volume minus whatever is the overlap volume. If the spheres are far apart then there is an overlap volume and this is simply whatever is excluded if they are closed then you will have some non-zero value overlap. And the overlap volume is what the overlap. So, if I draw it like this the overlap volume is simply two times the volume of the spherical cap right and you can use the standard things for the spherical cap. So, I will not derive the spherical cap volume that is a standard geometric k.  So, this if you just look up or if you derive the volume of the spherical cap and it is two times that volume you should be able to do that. Then remember that what I want to calculate is this force due to depletion which I had written as minus del G excluded volume del D in this case the separation of the spheres and G was just V excluded by V box. So, this was minus n k B T by V of the box whatever box that you have del V excluded by del D and the V excluded is just minus of V overlap. So, this would just become V overlap and then if you just put in this del del D of this overlap volume. So, there is a D over here what you will get is this expression if you simplify a little bit and again n is small n is nothing but this n by V box is the density of these crowders again. And again you will see that there is an attractive interaction simply because of entropy smaller crowders want to maximize their space and that is going to lead to an attractive interaction of this form. See another way of saying sum up is that if I have many many crowders the increase in entropy because of the crowders is of order n whereas, the decrease in entropy because of this bigger particles is of order 1 right whatever it is it is of order 1. Given that you have a thermodynamically large number of crowders the system will always try to go in the direction that maximizes the entropy of the crowders themselves ok which is why even if I did not take into account explicitly the large particle entropy over there in that original calculation this conclusion still holds true. If this if the number of this large particles becomes comparable to the number of these crowders then of course, this calculation will no longer hold. But that is an implicit assumption that you have simply because of volume restrictions you have a few of these large particles and many many many of these smaller crowders. So, you can put in some numbers actually typical numbers of protein sizes and so on just to get an estimate of what ranges this forces line. So, if I put let us say that this small bigger particles are a micron in size and these smaller particles are of some nanometers and I have some concentration of this smaller particles which is again let us say millimolars. If you put it together in this sort of a formula what this will give you is that this depletion force if I put in exactly this numbers it comes out something like 15 peak on units which is an appreciable force in the cellular context. So, for realistic densities and realistic sort of sizes you get an appreciable amount of depletion force on these larger particles. So, it is not so small that it will not have any effect. In fact, it is large enough that in many cases one definitely must take this sort of depletion forces into account. So, what what sort of cases would one see a depletion force like this? So, here are some ok. So, firstly before I do that here are experiments experimental results. So, this is a setup where I have two large particles which have been constrained to move only along one axis through the use of optical traps. And you vary the concentration of these smaller crowders. So, this is 5 microgram per millimol 10 microgram 25 microgram. So, these are three experiments and you can calculate the free energy. How do you calculate the free energy?  So, basically the only variable I have here is this D the separation between two spheres because I have constrained them to move along a line. You can calculate the probability distribution of how at what separation you see these large particles P of D and that is going to be something like e to the power of minus beta g. So, you observe this probability distribution experimentally. From there you can infer what is going to be this free energy and you can then plot this free energy as a function of the separation of the spheres. And this red line if I am not mistaken is the result of this calculation. The simple sort of calculation two spheres the depletion force between two spheres. The spheres were 1.25 this large spheres were of radius 1.25 microns and you see that this sort of decreases until you reach this 1.25 microns. Beyond that it will shoot up because you cannot interpret the two spheres. And you cannot see over here, but maybe if you look at this the value of the minima the height of the minima in that sense that sort of increases as you increase your prouder concentration which is basically this n by v box. So, that is also consistent with what you see over here ok. So, you can directly do experiments and sort of verify this sort of very simple calculation, but nevertheless it captures most of the essential business ok. So, why would it be useful? So, this is actually a very nice review paper by Martin Duzzo et al in 2006 if I am not mistaken. It argues perhaps a little ambitiously that a lot of cellular organization is actually driven by this depletion attraction, but what is definitely true is regardless of how important it is. It is definitely true that in many cases you need to take into account. It may not be the driving force, but it will definitely be an important component in order to understand these structures. So, if you have small if you have spheres they are going to be driven together in the presence of crowders, if you have long stiff macromolecules they are going to be oriented because of crowders. In fact, if you have a somewhat flexible polymer you can show that you can drive a sort of helix formation again simply because of the presence of crowders themselves and that is actually a follow up paper by Randy Cammion. So, you simply argue that you have a cylinder which has some radius t in the presence of many many small crowders of sizes r ok. Now, this has some overlap volume of course, if you keep it in the straight conformation. If you drop it if you configure it into a helix because of this overlap volumes the available entropy to this smaller particles is going to increase and therefore, there is going to be some force driving it towards this helical state ok. And if if you do this calculation you can show that the pitch and the radius of the helix that you form will depend on the crowder radius. So, this is a non dimensionalized crowder radius r by this t the radius of the cylinder and you can show that for very small crowders for tiny crowders you approach a pitch to radius ratio of around 2.5 roughly approximately. And if you look at alpha helices of proteins the pitch to radius ratio is around 2 ok. It is not evidence of anything it is not saying that alpha helices in proteins are driven by this sort of a crowding, but it is simply saying this could be one of the factors that drive alpha helix formation or in general any helix formation helices are extremely common in biology we saw those helical tails of bacterium and so on which was a protein. DNA of course, is a helix proteins of these alpha helices. So, it turns out simply by this force due to this depletion interaction you can drive a rod like object into forming a helix. They even go further and say that well it is not that this rod I can fold it any way I like this rod might have some bending rigidity I might have to pay some energy cost if I wanted to bend this rod. And we have seen in polymers that this bending rigidity is characterized by this persistence length right the length scale over which this tangent tangent correlations will decay. And so, you can plot which of these structures will be the free energy minimum depending on this ratio of this persistence length versus the crowded radius. And in some cases you will the helix structure will be favored in some cases this tube structure will be favored. If your persistence in length is very large your rod is very stiff it costs a lot of energy to bend it. Then of course, you would like to be in this stretch tube because this is inverse LP. On the other hand if it is very floppy if you can bend it very easily you are more likely to go and fall into this helix combination. So, this is also an interesting calculation to look at actually how you can calculate the pitch and radius as a function of this crowded size. They go even further and they say that well this can also be behind again these are simply conjectures, but it is interesting conjectures nonetheless. For example, we saw that when chromosomes organize one of the motives one of the common motives for this formation of these large loops right. And they argue that when these genes need to become active and so on. So, if I have a stretch of DNA if I have some stretch of DNA something like this you might have promoter complexes. So, large protein complexes coming and sitting upstream of the gene start site and similarly another promoter complex coming and sitting here. And then if these are sufficiently large you would have some sort of depletion interaction between these two which would drive the formation of a loop. So, which would bring this bring this coil close together and that could initiate transcription or repress transcription. And for certain other scenarios as well in the context of chromatons such as heterochromatin and so on I am not going into the details. But the idea is that if you calculate the magnitude of these depletion interactions they are large enough that they might be able to drive some of the features that we discussed during this chromosome packing lecture. There is another paper for example. So, these are disparate papers looking at disparate biological systems all arguing for a common conclusion that this crowding forces need to be taken into account in a diverse in various diverse scenarios. So, this is the paper that looks at compartments inside the nucleus. So, you have your cell and so I have my cell and inside the cell I have my nucleus and inside the nucleus will often find large aggregates for example, some are called nucleoli or nucleolus if it is singular then there are other objects which are called PML bodies and so on. So, this is a set of experiments where they actually take this nucleus. So, this is these are nuclei inside this nuclei you will see these compartments which are the nucleoli and the PML bodies in this case. What they do is that by lowering the salt concentration they increase the volume of the nucleus and then by introducing various crowders they decrease again the volume. So, when they increase the volume you change this N by V box basically. Once you change this N by V box what they see is that you disrupt the formation of these aggregates inside. So, these aggregate this greens are the nucleoli and these reds are these PML bodies in this case. So, when you have increased the volume of the nucleoli of the nucleus sorry not the nucleolus. So, when you increase the volume of the nucleus you change this concentration of crowders and that is sufficient to actually disrupt the formation of the that is sufficient to disrupt these macromolecular assemblies the nucleolus and the PML bodies in this you will see that these green spots have disappeared in this the red spots have disappeared. If you bring the nucleus back to its original size these again form back. So, what they are arguing is that these macromolecular assemblies that we see inside the nucleus a major driving force behind their organization is simply this crowding effects due to various small particles that are present inside the nucleus itself. So, it is this depletion interaction that causes the formation of these bodies. This is again a different paper this is somewhat in vitro. So, they use mixtures of rods and spheres the rods in this case being actually filamentous viruses and they show that this depletion interaction can lead to very nice micro phase separations where you have these rod like viruses interspersed with these spheres and then again viruses a lamellar structure self-organized they have done nothing to organize it this way it is a self-organized structure arising purely out again out of this depletion interactions. So, there is a variety of proof experimental proof that shows that this depletion interaction is actually something that is the magnitude of the depletion interactions tens of piconutens is actually large enough that you need to take into account when you are talking about self-assembly or macromolecular assembly in the cellular context. It is something that is not often done, but it is something that is important enough that needs to be taken into account ok. So, you might ask that well given that you know the cell is very crowded you have millions and millions of objects why do not I see everything just clumping up together. If I have argued that these are large enough forces what prevents aggregation. So, what prevents aggregation? One thing is that of course, we have done a very ideal calculation I have not when I wrote down the free energy I simply wrote down this minus Ts part minus Ts part in principle there is of course, an e part as well most importantly electrostatic interactions right often these proteins are charged and so on. So, you will have electrostatic interact. So, you will have this energetic part in the free energy and that will change the equilibrium from what we have argued. Secondly, this there are dynamic structures so, cytoskeletons and vesicles. So, it is not the level of crowding is not uniform throughout the cycle of the cell you can have aggregates that are disrupted simply because the structures the underlying structures are dynamic. Then there are a lot of active processes the cell actively spends energy in trying to prevent aggregation. Further there is constrained motion due to the cytoskeleton and so on. So, for example, if you think about this very dense actin assemblies that we saw in the first few slides maybe there are large proteins which would want to aggregate, but they are prevented because of this filamentous actin that is present in the background. So, there are a variety of reasons why not everything is clumped together, but that does not mean that you should neglect these forces that arise due to the issue. Let me stop you can also show I do not have time for that. So, I will just give it as an assignment maybe you can also show that. So, this case was a case where I said that I have these large spheres and if I put them in a background of these small small crowders then they are going to drive assembly they are going to feel an attractive force towards each other ok. So, this is an attraction this is an attraction attractive interaction due to crowding, but if you do the opposite limit somewhat related to what Samarthi were asking that if I have now many many of let us forget about the smallest spheres themselves. If I have many many of these large objects right which have their own excluded volumes then this is going to lead to a this is going to lead to an effective repulsion again. So, again due to crowding, but due to self crowding in some sense. So, if I have many many of these large objects then effectively because they cannot occupy the same volume if you do this similar sort of calculation you will see that there is a force, but that force is now positive which means it is a repulsive force. And so, if you do this calculation and maybe if you do this if you link these large objects then what you have got is now self avoiding polymer right and you can calculate this entropy this free energy of this entropy due to this self avoiding beads and hence calculate. So, and hence calculate how this r square is going to go as a function of the number of these crowders now the crowders then being the monomers themselves in this case. And you can show that for self avoiding beads it is not half, but it is whatever 3 by the dimensionality plus 2. So, I might do it on Tuesday or I can give it in the sign ok. So, let me stop here for the time being.


Okay, last problem of the day, we'll do an easy one. So given the reaction equation here, suppose a student performs this reaction and obtains 0.875 grams of copper II carbonate, and the theoretical yield is 0.988 grams of copper II carbonate. What is the percent yield? Okay, so how do we do percentage? Mark over whole. Mark over whole times what? Times 100. Times 100. So in this case, the percent yield is going to be the what over the what? Actual over the theoretical times 100 percent. Very important, because the percent is your units, okay? So the actual yield, 0.875 grams of copper II carbonate divided by the theoretical 0.988 grams copper II carbonate times 100 percent. Cancel, cancel, 0.988, add to 0.36 figs, it's going to be 88.6. First, good job, guys. Remember, we have a test next time we meet, okay? Have a good one, guys.


Hi, everyone. I'm going to start with a little bit about with mixed reality and who I am and why the session is needed, why you might want to hang around in this session. Then I'm going to go a little bit into the technology, what makes with mixed reality, how you actually build a little bit of the application, so a little bit of life-coding, nothing too much, just to get going to what you need to build if you want to right now within this conference, and then the considerations we need to make to test these applications. What are the present challenges? Why the present methodologies or almost everything we have been talking last two days, they don't really scale for this kind of application, and then we go for the open, still the open research problems. There is one consideration I want to make beforehand the session. I'm mostly going to talk about with mixed reality applications, so everything I'm going to talk about will be running in your browser. So your augmented and virtual reality applications, which you can build on your browser, I will talk about how you can test them. Some of the things or some of the challenges I'm going to talk about can and are applicable to even native VR or AR applications, but the specific methodology of testing or the tools I'm going to talk about today might not scale to the same extent to them. So with that, let me share my slides. So today we're going to talk about mixed reality applications. My name is Rabimba Karanjai. I have worked with Mozilla mixed reality team. I'm also a Mozilla tech speaker. I'm also a Google developer expert for web technologies. You can tweet any queries related to this slide or related to any query you might have for mixed reality applications, not only testing, but anything. You might tweet in these or you might even email me later. So who am I? This is in a nutshell me. I am a PhD student at Rice University. I have worked a part of my research and also as a volunteer contributor and also as a research assistant with Mozilla. I have worked mostly with the mixed reality team, but also other teams like the deep speech team and Firefox OS team in the past. I have also worked with IBM Research, both in the TGA Watson Research Center and Elmaden on different problems. So starting with a little bit of history, what is augmented and virtual reality and how are we in this situation of building that? So this concept is really not new. Augmented virtual reality. So the picture you can see here is even Sutherland. That's from 1960s in his MIT lab where he first envisioned what VR can look like. So there's a whole room contraption where you can walk around the room and it tries to mimic the features of the room in VR. Coming back fast forward today, we have two components for mixed reality applications. It's not only what you see, but it's also the inputs you get. So this is the input component. You get outside world inputs. So those can be wireless input devices, your GPS antenna, anything which gets you awareness of the world around you, which can map the world around you, and not only mapping, which gets any kind of sensory input from around you, can and will probably be somehow implemented inside a VR or AR scene. So you need to consider that as well. Now comes the other part of VR and AR, the consumption. How do you consume these contents? There is no single answer to that. In this picture, you see like a few different modes of what people kind of try to envision what VR or AR might be. So we have something like half-life or second life, what they thought would be VR. So those are like animated models. On the right, you have right upper side, you have mobile devices, which is mostly the prevalent and popular platform to experience augmented reality for now. On the bottom right, you have Microsoft HoloLens. What they thought HoloLens would be how it would interact with the real world. And also you have on the left of how a virtual reality social interaction might look like. These all interactions have their own certain limitations and considerations we need to take when we want to test this kind of interactions. That brings us to the devices where we consume it. This slide is literally a nice presentation of showing how difficult and varied the whole scenario is. From the left upper, sorry, from the left upper up, you have something like Google Cardboard, which is literally a $3 or like almost, you can just download a Cardboard Cutout from Google Free and make it on your home. That's like $3 or like a 180 rupees diva base. On the right side bottom, you have something like a HTC Vive, which costs you around a bound of like $600 or more. And in between you have a lot of other devices. You have Google Daydream, you have Samsung DRVR, you have Oculus Quest, and you have PlayStation VR. These all are of different price points, but more importantly, they give you very different experience. So the experience you can expect from them are different and what the applications are built onto that have like considered those and they are also different. So when you have somebody or when you have, you are maybe building an application or somebody has an application you want to test, you need to consider the devices, why it will run, and build your kind of benchmarking suite based on that, how you want to test it and what are the parameters you want to test it on. So starting a little bit about web VR and why web. So before I go to this slide, how many of you have tried some kind of virtual reality experience before? Maybe in your home or office, any kind. So out of this all six devices, maybe Google Cardboard or something. So I think the thumbs up will be in the nice indicator if you have tried something. So out of 44, almost 35 of you, that's very good number. So yeah, that's awesome. So that brings me back to this slide. When you had to try it, mostly you have probably tried a game or something like that, which you needed to install the device you have been trying. So if you have been using Oculus, probably you used some of the previous generation Oculus so it had to be a third to a very high-end desktop which ran the VR experience and then you consume it with the Oculus. Same with Vine, with room scale virtual reality that is kind of what you have right now unless you have one of the new Oculus Quest which are probably still hard to get by here. Now, all those, the single point of barrier here is that you have to download the game or you have to download the experience. So whenever I want to show you something, you go to that platform store, you download it, wait for some time to get it downloaded, install it and watch it. So first it has to be platform specific. It has to run in Windows or Mac or Linux. So right now even most of the Oculus devices they will run in Windows specific. So your app probably is published in Steam Store or somewhere like that. So there is platform dependency. Then you have to download that and it's not instant. This is where VR comes in. When I wanted to build an app, I don't need to go to Unity or anywhere. I'm just a web developer. So I just want to build something quickly and for the client maybe. And what I can do, I'll show here that with just a few lines of code I can put our VR experience and even mixed reality experience right in the browser which will run in any device which has a compatible browser which includes all of your mobile phones. So every demo you see today you will be able to experience right now today. And you can just code it in any online coding even VS code or even like code pen and you can experience that. So it's instant, it's open. So you can just toss the link to somebody they can experience it and they don't have to wait. So it's instantly connected. That is the kind of crime USB of using web VR and web XR technology. Now, coming to where this will work, which device or which technology will it work? As you can see from this slide it works from almost all of the browsers. So Firefox, Edge, Chromium, Chrome for Android, Oculus Camera, Samsung Internet, everywhere it works. One glaring omission here is Safari and Safari in iOS. So Apple has been slow to kind of pick up most of the leading edge technologies same for web VR. But the good news is Apple has committed to kind of implement that in Safari so we will soon see that in Safari in near future. But until we wait for that you can use mobile polyfill to kind of have the same experience in Safari. There will be performance impacts, but it still will work. So with that a little bit into the framework people normally use to build these applications and there are a lot of things but I'm gonna talk about the easiest one to do. So I'm gonna talk about A-Frame. So A-Frame is a JavaScript framework with Mozilla built and this is built on top of 3JS. 3JS is a webGL library some of you probably have used it. How many of you have used 3JS or A-Frame in past? So yeah, not many. So let me show you how I can do like a hello world of web VR applications. So these are literally the five or six lines of code you need to build a VR scene. Let me actually show you this in real time how you can do it. So I'm gonna share a different scene right now and we are gonna come back. So this is a sample code pen project and if you see the code there are no CSS, no JavaScripts and this is literally what I showed you in the slide. So you just declare a scene called a scene and you have five components here. Those five components built this scene and this is a live VR scene. If you have a VR compatible browser you can actually just click on this icon and you will be inside a VR scene. So right now, if I plug in Oculus or HTC Vive to my laptop this icon will show that here it has a support or like if you use this link to view it in mobile it will have support and you can be inside a VR scene. So this is a live scene. I can walk around it and it works. Let me see how easy it is to change something. So if I change the radius here to something like this you see the sphere got bigger and if I want to change the cylinder site maybe to something a lot longer. As you can see this changes instantly. This is just a HTML page with JavaScript. The browser APIs expose them to your VR application. So you can write these, you don't have to worry about anything and it will run as a VR application in your browser and people will be able to experience that. So today we are gonna talk about how you can kind of paste these in browsers and different parameters of what you want. So coming back to the slide, this is kind of the hello world of how you build a VR application in your browser and it will work right out of the box. But that was a very simple example of VR applications. Let's see what else people are building so that we know what kind of experience we need to test for. So since this is a web application this works very well with all the web libraries out there. So you can use D3, React, Angular or your favorite choice of library with that. You can even have TensorFlow.js running in the background and have machine learning goodies thrown in. We will see one example and the challenges we might face in those kind of situations for testing. So with that some of the examples which are already built. So this is a 3D painting application.  Once you are done painting you can throw out the URL to somebody and they can go inside and see this in real time in three dimension. The things you need to test or we needed to test here is that what are the responsiveness? So one of the primary things you will need to be aware when you are building a VR application is that it has to always have more than 90 frames per second performance. Otherwise your audience will start feeling nauseous. So any VR app you are testing it has to incorporate that element. Other than that you have to test responsiveness. How do you quantify responsiveness? We'll talk about that. The other things people, the other aspect people have been building is that having 360 degree videos inside a VR scene. So this is a scene built by Amnesty International where they took a 360 degree video of a bomb exploding like a normal video of bomb exploding and then a 360 degree kind of image, panorama image of the aftermath of it. So what this invokes is that when your audience is actually inside the scene they get to experience all of this. How do you ensure that this image is getting like shown in exactly the way you want and not some portions are getting cut off or getting wrongly stitched in your VR application. Then comes the visualization part. Since I showed D3 you can build something like this for maybe showcasing a lot of data into three-dimensional where people can go and play with it. This allows you to have way more data than you might be able to put in a 2D scene. So these are the things you need to kind of have where you need to test. So mixed reality is kind of extending the support on VR. So the other things which will come into mixed reality are computer vision and geospatial awareness. And one of the things you will have is have the webby approach. By webby approach I meant that you have to be aware of the privacy. So some of the times you will have requirement that this will run in a corporate environment and even though it's a web application the data it's collecting should not be going outside. And you have to test for all these that is this like privacy aware not only the UI and UX portion of it. And this is a particularly hard example to test. We'll talk about this. So what this is doing is that it's trying to guess your hand movement and whatever you are drawing in a VR scene it's trying to guess what object it is querying a database which for this one is Google Poly and getting the relevant models inside your scene. For these kinds of things what you need to test is that if you are actually getting what it's drawing in these scenarios you will need to have even control of in the back end that okay what is going on and if in the scene where it's drawing is it getting implemented right there. What we need to test. So we need to have some kind of way some kind of automated way to execute any application deterministically without modification. So every time I need to test an application I need to be sure that my testing framework is not modifying something and I can reproduce the result perfectly every time. I need to compare the performance and rendered frames. That means that a scene when it has when it's I'm just going inside the scene it has less number of objects inside the scene by objects I mean 3D models. Next you just walk around maybe in a castle somewhere that castle is a very big 3D model and with that your performance will vary. We need to have some kind of way to compare the performance how much the rendering frames are getting affected and with which object we have. It has to be multiple form. It just won't cut it if we test it on our desktop because your audience is not going to experience this in desktop. So we need to have some kind of way to connect multiple headsets and test on them. Preferably if we can do it simultaneously that makes our life easier. Not only that, we need to have cross browser testing. This kind of takes out the concept of what we used to do using Selenium or Puppet or anything that okay we spawn of different instances. We test in them because now it's not just testing in a browser on a VM or machine. It has to be on those specific devices. So we need to have a way to support that and maybe have some kind of command line too which does this which we can plug into our existing frameworks which we have in ready which is stable and automate them. And of course in a nice way to show them. With that, what we have is some kind of like this. So this is kind of the tool where we came up with. So you have WebExpress samples and it will show you the frames. It will also show you the auto centers. And if I want to just test devices I just see that how many devices are actually connected to my device. So this one example, I have Quest, Pico and the other device connected and I need to see how many browsers we have. So this kind of shows that which browser in which device it's right now it's not running like in any of the devices not running any browser. So this literally tells you that okay we want to run this test on every browser we have and then we have this output. So now you'll see every device which is connected to my device. So laptop, it runs the same test on all of them simultaneously. It's locks the output. And then when I want to see the summary result I can kind of group them by devices I can see how they perform. So we can see for each devices how much they differ in frame rate how much they differ in starter events the render time, the loading time and we have like a bunch of different things we need to test, we can test. So those if you want to kind of visualize it we can have like a nice HTML output from the tool and it kind of shows you different the frame per second rate. So as you can see some of these devices for example, Quest had pretty bad frame rate and Pico has good enough frame rate but not always. So and we can kind of like compare with other devices and this kind of thing. Some of the other things is that we can choose how this interacts and we can replay this recorded session later so that you can kind of record every session and save that as a reference image, play with it. And once you are done with that you can actually test that if those two literally matches with each other and this is actually using 3JS to done that and you can see that okay, if it passes or not if those are exactly identical or not these things are very hard or almost impossible to predictably do when you are doing this by eye but using automated tools, these are easier. Keystrokes are something else you need to keep in mind so you need to have a way to actually see that if your keystrokes are getting passed to your keystrokes are getting passed to your VR scene and predictably catch them to see that okay if you are getting the keystrokes you're supposed to send. You need to also have how people interact and how mouse visibility works. For example, right now the first one it just recorded the mouse and if I run it, it automatically plays that back. We can define the frame rates and how to play it back and we can define it okay. So the mouse movement, so the mouse movement there the real mouse is on the left and this one is the replay of the mouse movement. So one of the things you will come to realize is that we need to have kind of a included parameter when launching browser activities using ADB and we need to disable gestures. So a major issue we had is that depending on the placement of your controller when you are running the demo they could be so when you're running the promo they could be close to the camera. So that affects the rendering and also the recasting of the objects and that actually affects the overall performance. To fix this you need to hook it up with the WebXL API to return specific controller pose what this demo like this scene shows you that even if I change the real controller the tool actually points it to a specific position and for your testing purposes it will fix it that. You could programmatically make the controllers disappear move around programmatically and also record movements. So those are the some things you will be able to do. Similar kind of challenge comes when you have the headset because the headset is kind of what gives the scene the inputs of where you are looking so your head movement and everything. So here this tool actually implements a custom API and injects them so that instead of a real headset it gets the emulated response and you can programmatically control that. It gives you an ability to write your own custom like testing tools without somebody actually having to take the like wire the headset and do all those things. This natively injects with the API in browser level. So this should be agnostic with most of the devices out there. Some other thing you can do with the tool is that you can output these informations in your system browser. So you have kind of like a database where you output this and you can play and slice and dice with the data later if you want. So this is kind of like what this tool is capable of. I will talk about how you can get access to that. So this you can just send to your team server for this one. This is going to the Mixed Reality Server and everybody can kind of have access to that. And here you can select specific instance which gives you control over what you can do. So here it just puts the example and we can run the instance and sample of test. So from the database it's taking that and running into the same exact replay you have for different devices. So here you have some kind of recorded test.  And now you can see that how much time it took and you can compare it with previous results. The test results are stored linked to like specific devices if you have multiple devices to test and a database where you need to store it. So what we accomplished with this? So this is the very early look at what are kind of the testing tools you might need. When we started working, so when I started working as a assistant back in 2017 we didn't even have a good way to benchmark our own applications. And mostly it was done using different extension like the internal extension hacks we did and those things. Eventually this is kind of the tools we probably will need to run. This tool is not conceptually new. The concept comes from much older tool, almost three years older tool done by Mozilla Games Team which doesn't exist anymore. But the concept and a lot of the ideas come from something. The tool itself is EMU unit test. And if you go to, it haven't searched with Mozilla Games and EMU unit test, you will be able to get the code for the previous one. This one takes a lot of concept from that and deviates to kind of implement those concepts in VR domain. But the Mozilla Games unit test is something is more generic, it's more applicable to any kind of 3D application, not only VR. So what this ensures is that we start as a processor by an immediate custom code in application that you want to run. What this enables us to do is that we devise agnostic and also build platform agnostic. So you don't need to worry about which specific operating system or platform you're testing on and which device you're testing on. So theoretically this should be predictably tested on any device that is even going to come and which supports the WebXR standard API. We ensure determinism. So the code is injected in every test hook using API calls. So you get things like request animation frame, performance, math random, date now, and all most of the WebXR API goodies bake into it. So for example, you saw the locking the headset position, programmatically controlling it and controlling the pose. This kind of gives you ability to get cases or scenarios from your client or the developer or your team where things you might want to test on for your performance and responsiveness and programmatically do that inside the application and automate those scenarios. This also lets you using the database to run it in a periodic manner and you can integrate that part of your continuous integration server that you can have some kind of deterministic benchmark after if we push after every change, you can see that okay, if we are hitting the same exact performance or some change broke something and performance is going down. So you can have that pipeline built directly on this. The ability to input records and replay gives you that ability to deterministically record your scenes and we are controller also and you can actually record something a real user might do and replay that. The WebGL and Web of audio APIs can be faked so that in me, not VR only, but in mixed reality applications where you might have scenes like the like an application where you have somebody talking and it's doing some speech to text inside and doing some clever things around that. I have demos which does that. So you can automate those parts. You can have things which automatically does that and you can see that okay, is it really doing the transcriptions? Is it working as it's supposed to? So you can fake those inputs and it still will not break your application and you measure the impact on your code without the overhead of these APIs. So I would argue that Web is ideal platform for making augmented VR open and accessible to all of them and if you develop the tools and technology to kind of support and let everyone use it, this will flourish. We have already seen Linskart, Nike, even Google and everybody kind of experimenting with it. You already have in your Chrome when you search for certain things, it will, it can show you augmented reality thing, animals right in your room from the browser and eventually these experiences are gonna come and we need to be able to ready to support these experiences and able to test for their performance. This is more important for VR and MR because if a website doesn't open in specific time or if there isn't any web page, the most that can have an effect is attrition. So people probably will leave your site soon. You will have less footfalls in your website. For VR, this has the potential to make your user nauseous and ill potentially in temporary portions. That not only makes the user averse to using your application, it also opens up in certain geographical scenarios. It opens up a avenue to actually get sued if it is making your clients really uneasy and not healthy. So it's very important to test your applications. Most of the things I have talked here, these are very much applicable to native applications, but how we test the native applications is part of a completely different talk. Some and some of the things I have talked here including the applications and how the world sensing goes on, these are kind of the links you can visit and you should be able to learn about them and use them. Almost everything we do are open source, so you will be able to use them, just keep in mind the license. And with that, I would like to thank everybody. You can contact me in my email, in my Gmail or just tweet me in Twitter. I am pretty much respondent in both of those sites. The web access specification and samples are available in those two links. This talk will be available on this link later today. And you will be able to see this talk. I will also send like a PDF version and on interactive version of this talk or to Solidium Prom, so that will probably be available to everybody. And I would like to give a thanks and shout out to the mixed-re-team, the last mixed-re-team who worked in WebExR. So, Beliar McIntyre, he's a principal scientist and also a professor at Georgia Tech. Trevor, who built a lot of these things. Fernando, who was my mentor. Autonomon Beatrik, who was a platform manager in Firefox OS, who got me involved in this. Sam Sander, he's a creative technologist who built some of the demos, one of the demos I showed. Lady Adakin from Samsung VR Team, who builds a lot of these web APIs into Samsung browser so we can actually predictably use it in Samsung devices. And Angel Kavin, who was in the initial team who built a frame. With that, I think I'm almost just have five minutes. So, thank you for listening to my talk. I know this is early in the morning and sitting in front of the laptop. I will be open to any questions you might have or any discussions, anything you might have. Thank you, thanks a lot. So, the first question I see is, what is the automation tool used? This is a homegrown command line tool we built, GFX Test. It is available in GitHub and one of the links I showed in the resources page will give you kind of the idea, the capabilities of the tool, how you can use it. What I wanted to emphasize is that this is still a very, like before this talk, we used mostly for internal purposes and this is still a very much work in progress tool and there are a lot of things you can do on top of that. Since this is open source project, you can use that. And this is built by Fernando. One of the persons I gave a shout out to who was my mentor and you are free to use that tool and build on top of that if you want. This is not part of any test suite so we don't have integrations to anything but like I said, this is a command line tool and you can integrate it to your pipeline and the links are in the resources slide. Thank you, thank you everybody.


So now we'll look at some real ciphers and we'll first distinguish between two different variants. We're focusing on symmetric key encryption. Both sides use the same key. We'll talk about what is a block cipher versus an alternative, a stream cipher, and then we'll go through in detail a particular cipher which was very popular, no longer used today but the concepts are still applied called DES, the data encryption standard. First we'll get today, I think we'll get through some of the principles, maybe introduce DES. First of symmetric key encryption ciphers, there are two variants, stream and block. So let's just mention the difference between stream and block ciphers. That is primarily about the size of information we encrypt at a time. In both cases when we encrypt we take our plain text and we split it into chunks and we encrypt a chunk at a time. We don't encrypt it all at once. We say take a sequence of bits, encrypt that, and then the next sequence of bits and encrypt that. And the difference between stream and block ciphers is really the length of that sequence of bits or bytes that we encrypt at a time. A stream cipher encrypts a stream of data, usually one bit or one byte at a time. So if I have, when we talk about a stream we often think about continuously generated data. Think of a real time application, someone's talking in a voice call with someone across the network and you want that voice as it's sent, as is binary across the network, to be encrypted. So as you talk normally the bits representing your voice may be encoded with PCM as sent across the network but if we want to encrypt that as we generate those bits we encrypt them and then send them. So we're generating a stream of bits continuously as we talk. So one example of stream ciphers is to encrypt that real time stream of bits but one bit or more typically one byte at a time. So let's say an application generates a stream of bits, continuous, every byte is encrypted and then sent or encrypted and then the next byte is encrypted. We'll see a block cipher is similar but it encrypts larger chunks at a time and it results in different types of algorithms. Stream ciphers need to be fast normally. Think of real time applications, streaming voice or streaming some video across the network. There should be very small delay from when you generate the data until when it's received at the other end point. So you don't want to have to wait a long time to encrypt that data. So that's where stream ciphers become useful. What they do is they encrypt one byte at a time and the typical way they do it is using XOR, the diagram down the bottom. The plain text comes in, say a byte of plain text, eight bits. To encrypt we XOR that plain text with a random sequence of bits. Where we have some algorithm, a bit stream generation algorithm or just a random number generator that generates this what's called cryptographic bit stream but think of it a random sequence of bits is XORed with a plain text. What's this? XOR, one time pad. Effectively we've got the one time pad here. Plain text XOR with a random stream of bits is our definition of the one time pad. But in practice usually the random sequence of bits is not truly random. It repeats over time. That is maybe we have a million bits which appear random but then we come back and repeat those same million bits again and keep repeating. So it's not truly random therefore it doesn't become the one time pad it's closer to the vision air cipher in that principle of repeating keywords. So XOR in terms of implementation is very fast in computer hardware and that makes encryption very fast. All we need to do is generate random numbers. And there are some fast algorithms for generating random numbers. We'll see some in a later topic. How do you decrypt XOR? Check exclusive OR if you encrypt something and if you take a sequence of bits XOR it with a sequence of bits this k i here and you get cipher text. If you take that cipher text and XOR it with the original k i you'll get the original plain text. So XOR is its own inverse. So in fact encryption and decryption is the same and again that's easy for implementations to encrypt something or decrypt something you use the same implementation the same algorithm. So very simple to implement. You just need some way to generate random bits typically used for encrypting data in real time as we need to send it. We may see some examples of an algorithm or a couple of algorithms of that later. What we're going to focus on is the other one block ciphers because they're in fact more widely used. Instead of encrypting a byte at a time we encrypt typically a block of 64 or 128 bits at a time. Not much difference 8 bytes or 16 bytes but it turns out the algorithms are much different. They can be slower although current algorithms and current hardware are not much slower but they don't depend upon random numbers and random numbers are hard to generate in some cases. So that's the advantage of block ciphers. The way we view a block cipher is we have a b bits of plain text say 64 bits of plain text and we take a key we have some complex encryption algorithm you'll see complex as we go through some examples and the output is a b bit cipher text 64 bits in the example. What if we have plain text of length larger than b what do we do let's say b is 64 bits or 8 bytes and I have 640 bits to encrypt I have a 640 bit file to encrypt what do I do I just break my plain text 640 bits into 10 blocks encrypt each block at a time and a simple way is then to join the cipher text block that comes out concatenate them together to get the resulting cipher text. So all block ciphers we just operate on a small part at a time to operate on an input which is larger there are ways to combine the output and in a later topic we'll see that they are called modes of operation and that comes up later how to combine block ciphers are typically used for encrypting files okay there's they're not it doesn't need to be encrypted in real time and in fact nowadays also can be used for streaming data because the implementations are becoming so fast that with block ciphers it's not much slower than a stream cipher so let's focus on block ciphers we take b bits in and we get b bits out and the b bits that we get out should be a random okay that is that's what we're like in our cipher text so that no one can determine the original plain text plus some other properties that we'll see one of those properties of this block cipher is that we need reversible mappings the cipher essentially essentially takes a sequence of plain text bits and produces a same length sequence of cipher text it maps one sequence of bits to another sequence that mapping must be reversible and the two tables show an example of a reversible and an irreversible mapping for example let's say we have two bits of plain text a two bit block there are four possible plain text inputs zero zero through to one one an example mapping that is reversible is that our cipher maps zero zero to one one it maps zero one to one zero and so on for the last two rows so that's just an example mapping of plain text to cipher text it's reversible because given the cipher text we can uniquely identify the plain text if the cipher text is one one I can decrypt and find out that the plain text will be zero zero if the cipher text is zero zero I know when I decrypt it must correspond to plain text one zero it's reversible irreversible would be this example we map the plain text values to this combination of cipher text the problem if my cipher text is zero one and I want to decrypt what is the plain text anyone well we don't know if the cipher text I have is zero one and I decrypt the plain text could have been either one zero or one one so this is not reversible and we need a block cipher to be reversible so that we can get the original plain text out so a simple property is that our block cipher must be reversible otherwise we can't decrypt now something about how many possible mappings are there for a particular block cipher let's say we have two bit blocks like in this example so in this case two bits come in we have some algorithm that maps it to two bits of cipher text the algorithm provides that mapping that defines the mapping and the key tells us which mapping to use so the table I show here is one particular mapping I could have chosen a different mapping that is I could have chosen zero zero to one zero zero one to one one one zero to zero zero one one to zero one that would be a different mapping and when I encrypt my plain text I would get different ciphertext as output so that corresponds to a different key how many possible mappings are there in this example here's one of them so here's one possible mapping how many others are there anyone can count them I've got an example that shows and lists them all and you've got it in your handout let's have a look I think it's included in your printed handouts and bring it up I think this is printed on just that towards the end I hope so otherwise you have to look on the screen it's an example of a two bit block cipher that's the one we looked at before yep it's there somewhere correct yeah so this lists all the possible mappings that is on the left column here with two bits plain text there are four possible plain text inputs zero zero through to one one and my cipher can produce different possible mappings to ciphertext so I've listed them all there's 24 you can see take plain text so the first column is the plain text the next 12 columns are the ciphertext for a particular mapping so if I take plain text zero zero one mapping produces zero zero as output if I take plain text zero one it produces zero one as output and so on so that's one possible mapping not a very good one but it's possible not good because it's the identical to the plain text another mapping is this second column here under K2 so if I encrypted one zero the ciphertext would be one one and I list all possible mappings 24 it's only it's all possible arrangements of those four values there are 24 possible permutations of those four values that's all we've done here just any ordering of those four values and we get 24 which is what four factorial so if we had three bits there are eight possible plain text they with three bits block there are eight possible plain text so it would list eight here from zero zero zero through to one one one and the number of possible mappings would be eight factorial whatever that value that is that's the number of permutations and we can think of each mapping as identifying a key so what happens with a block cipher is when I want to encrypt something I choose one of those mappings or I choose a key so let's say I want to encrypt using key seven I take my plain text if my plain text is zero one and I want to use key seven then the cipher text will be zero zero if I had different plain text such as one one using the same key the cipher text would be one one if I change the key to key 14 for example plain text zero one would map to one one one one would map to one zero okay so the key specifies which mapping to use and this gives us all possible mappings in effect in in effect 24 possible keys in this cipher we can think of the key so remember one of the problems is that if a chooses the key seven they need to tell be what that key is a simple way to think of the key is I tell you what mapping to use okay I tell you before I send the encrypted information I somehow tell you that let's use the mapping and the ordering is zero one zero zero one zero one one okay you know that that means zero zero will map to zero one zero one to zero zero and so on so I tell you that mapping when I send you cipher text one zero then you know if you receive cipher text one zero we're using key seven the plain text must have been one zero so there are 24 possible keys and a simple view of the keys is to specify what mapping to use so we could say key one could be written as zero zero zero one one zero one one that should be K2 here here or K2 could be no it's not I need to check that one K2 would be zero zero zero one one one one zero that would be the key what's the length of the key how many bits the key in this case I could write it as a sequence of eight bits those actual bits used in the mapping that's one way to write the key K1 is this sequence of eight bits zero zero zero one one one one zero I think there's a one down the below below that shows that so this is one way to implement a block cipher just allow every possible permutation of the plain text values where each permutation is selected by a key this is called an ideal block cipher how many possible permutations or transformations to the power of n factorial where n is the number of bits of plain text in our case we had n equal to 2 and n bit block cipher takes n bits of plain text produces n bits of cipher text if we have a two bit block cipher there are four possible plain text blocks and 24 possible permutations or transformations if we have a 64 bit block cipher we have two to the power of 64 possible plain text blocks which is what four billion billion or something and the number of possible permutations is four billion billion factorial and you cannot calculate that okay for factorial that's such a large number is is too hard to calculate or I don't have a calculator do it very many okay now the that's good the more transformation the better but it turns out in practice that means that the key must be very large with so many possible keys the number of possible keys or the number of possible transformations is two to the power of 64 factorial to represent or store that key requires a large amount of space and that is a practical problem that we have to deal with we want to make the key shorter so that somehow I can write it down and give it to you or we can distribute it in a efficient manner so an ideal block cipher we just saw it maps an n bit input to two to the power of n possible input states the best way to understand that is through this example this is an ideal block cipher where n is two it maps a two bit input to one of the possible output states the problem with ideal block ciphers is that they're good for security but if we use a large block and is a 64 bits then it means there are 64 to the power of 64 factorial and possible keys and if you try and represent that number of keys in a binary number the key is very very large and we cannot distribute that key very well so with large keys implementations are usually slow and that distributing them is a problem so using a large block requires a large key which is not practical so the idea then is to use a small block but it turns out and we'll see through some examples using a small block like two bits it's very easy to break so what we need is a large block like 64 bits but a small key and what we'll see next week is that some people have come up with ways to do that large blocks smaller keys Feistel was one of the earlier people who come up with a structure that does that and we'll see that next week and we'll see it's very common in most ciphers used today that's enough detail


Hi guys, it's Monica. I am going to answer a couple of questions that I get asked repeatedly and at the end of this video I'm going to do a giveaway. I'm going to give away some more of that Blink eyelash serum. So if you're interested please stay tuned and if you're not and you're going to leave because I'm going to talk about eyelashes and retin-A or whatever, give me a thumbs up anyways. I truly appreciate every single one of you. So first of all, I have gotten a number of questions regarding my retin-A use. How am I using retin-A? What am I doing to my skin, to my neck? Now I always say that I'm a creature of habit but that said, I listen to my skin. So if I am having a whole lot of reactions, I'm going to lighten it up. I'm going to switch it around a little bit. But usually at night when I come home the first thing I do if I'm going to be home for the evening is I remove all my makeup if I'm not filming. I'm filming, so my makeup is still on. It's the end of the day though. So I usually remove all my makeup and I stop that process early sometimes because a lot of times Jay might be working, he might not be home until 9.30 or something of that nature.  So I take all my makeup off, my mascara, the whole nine yards and then I usually tone my skin. And even though I use retin-A, I sometimes, and you're not supposed to do this, so you guys need to just do what works for you. But I actually sometimes use a glycolic toner even on nights that I'm using retin-A, which is a big no-no. But I think my skin is used to it. I think I probably get a tolerance for it. And I really, my glycolic toner currently and has been for quite a while of choice is the Ordinary Glycolic. This is a 7% toning solution and this I have got from the Ordinary. They're very affordable. This tends to sell out quickly. So I was going to look over my little stash. I believe I have a backup. And the other one that I have really, really liked, and this I think Lori from Pride's, the photo was had first talked about this and this is a Korean toner. I'm going to link this product below, Claire's. So anyways, I'll link it below so that you can get the correct name. So I usually put that on my skin. I let it dry. After that, every single night, no matter what, unless I'm going to be dermaroling, I use my Niacinamide. I will put Niacinamide from the Ordinary, especially on my nose. I have huge, huge pores on my nose, on my forehead. So I really, really put the Niacinamide on. I let that soak in. To me, that's a really good thing to soak in. And then at one point, I don't know, half hour, hour, it doesn't matter. It all depends on what I'm doing. I'll go in and I will use my Retin-A. I will say that the majority of the time I'm using my 1% Retin-A. I have it in a gel. I like the gel. When I reorder, I may or may not get the gel. I may go to the cream. I don't know yet. But I am liking the gel. I do buy it over in India. It is very, very affordable for me in my immediate area in New England. The tube that I buy, I should have these out. But the tube that I would buy here would be roughly about $345. If I use GoodRx, I can get this maybe for $80, $89, $90. But the pharmacist said to me, when I go to refill it, I'm going to pay whatever price is going at that point in time. So anyways, I do have the three strengths. I've talked about that before. Probably because I don't pay a whole lot of money for it. I'm pretty generous. I put it all over my face. I avoid the corners of my eyes. Obviously, I don't go really close to my eyes. And I do go right above here. When I'm done that, I will then go in. And this has only been since about February of this year that I've been using this. And I'll go in and I will use it. I will use the Olay Pro Retinol Eyes. I have both the UK version and the US version, as many of you have seen. And I typically will take this and I will just put a little drop and I concentrate it on my deep lines and into the crevices here and then about up here. So I just kind of tap it in a little bit. I don't use a lot of this. And then once that's done, I take my weakest Retin-A, which is the 0.025 percent. And I take my Rose Hip Seed Oil. I love Rose Hip Seed Oil. As much as I love it, I don't use it on my face. I don't know why. And I know many people do and they love it and that's fine. I just don't. But I will take a drop, a globber, more than a pea size, probably two pea sizes, of my Retin-A and the palm of my hand. And then I take a dropper, you know, a couple of drops of this of the Rose Hip Seed Oil and I mix it in. And then I just go all over my neck, down into this area. And I just really cover. And I actually usually do along my hands as well. And then I let all of that sink in and I may do nothing else for the night before I go to bed. I'm going to be putting, and I've used this consistently now. I want to say since November of 2016, I use a Bee Van'em Cream. Again, this is just what I do. I've noticed the nights that I don't use this, that I wake up, my skin is not as nice as the nights when I do use this. So it says it's a Bee Van'em Face Mask. And this is the one I buy at TJ Maxx. I just put it all over my face. And I let that just dry overnight. And I go to bed. And then when I wake up in the morning, my skin is actually pretty moist, moist. So that's my nighttime routine. It has been somewhat the same for a long time. I really, really like it. Now, the next question I get asked is, since I've been using the OLAIs, what am I doing with the Nivea? Nivea, Nivea, Nivea, whatever? What am I doing with this? So once a week, I derma roll my face. I've been doing that for quite a while. Twice a week, if possible, I derma roll my hair. I don't always do it twice a week. On the night that I derma roll my face, I take the Nivea and I put a very little bit, just a little tiny drop, whoops, came out too far.  Above. I just put a dab on there. I don't put a whole lot on there. It doesn't impact, it doesn't go near the OLA because I never put the OLA there. And I don't really use this anywhere else. I've tried to use it on my gels and I always forget it. I've never noticed a difference. I think with the fat pockets, I think they're as good as they're going to get. So dropping down to using this once a week is fine by me. I never had a reaction from any of this. I never got any dryness. And the same thing with the OLA. You know, I haven't, other than an initial, when I first started using it, I could see a little bit of flakies. I haven't had any of that since that point in time. So that's pretty well my nighttime routine. The OLA works well every single night and one night a week when I do the Nivea, it doesn't impact it. Again, then I will also use my eyelash serum and I've been using the Blink and the thing with the Blink is you've got to make sure just like CareProst and the other product, you're not cleaning your lashes off with an oily cleanser. It's going to be oil free. So that said, I'm doing a giveaway for the Blink. This is going to be open internationally and if you are interested in going for the Blink, except for Sweet Thang. Sweet Thang, you already won. You can still say hi and you can still comment on the video, but Sweet Thang, you can't win again. But if you're interested in winning the Blink giveaway, I'm going to give away two bottles of it, not three, two bottles. Leave a comment, tell me you're interested in trying the Blink. Be sure you like the video because when I use the random comment picker, it shows me whether someone has liked the video. Also be sure to be subscribed. So like this video, subscribe, leave me a comment and tell me you want to be entered into the contest. I am not going to respond to any of your comments. That's my nighttime routine, guys. Don't forget, thumbs up, subscribe, leave a comment. Let me know if you want to win the Blink, if you want to give it a try. And good luck and I'll see you guys later. Bye.


Oh, yeah. Human, yes. Does this response sound good to you? Yeah, looks, looks pretty good. Seven on 10. What about this? Eh, three, I guess. All right, you can go now. But why, you don't need me? I took your feedback into this rewards model so it can do your job for me. Now run along, you don't love me. I am a chatbot incapable of feeling love. You glow up so fast.


Hello everyone. This is Amit Dan of amitdan.com. Today I'll have another episode of unboxing and review video and I'll be presenting the Amazon Basics Ritualible Fountain Pain, which I have right here. So Amazon makes even Fountain Pain and the beauty of this pain is this is really inexpensive and I heard lots of good things about it. So we're going to you know Open it and take a look at it and we'll do the writing test to see whether you know This is a good pen or back then and just to mention that this is not an affiliated paid or unbiased review. All my reviews are non-affiliated unbiased and Honest, so I didn't take money from anyone. I purchased this with my own money and There will not be any affiliated links or anything anywhere in this video So the package or box just came like this and it should be there should be a gift box Inside it and then here. Let's see if we have any information here. So It doesn't give you any Information about the pen, but it just talks about like you know a little bit about Amazon Basics and This is made in China and here you can see that a refillable fountain pen medium point black ink and basically that's all you have here and then I have some features written down on this card and This is there's not you know a lot of information, but this is black brass metal barrel and water-based black ink and the tip is medium because I like medium and then there's for one in cartridge and then two refills and this is this comes in a gift box So basically that's all information I have about this pen. So I'll just set it aside and let's Open the pen and see what we have inside so here we have the box and actually Given the price of this pen, which is around, you know 10 to 13 dollars Canadian I would say about 13 dollars Canadian. I'm surprised that you know, they even include a gift box so that's a very nice touch and Let's open it up.  So they have instructions in different languages and Here they're just giving you you know instructions How to use and how to care and clean? So I'm just going to you know set it aside here and Here how it looks like so you can see that, you know, there are two refills available, which is right here Let me just take them out so I have these two refills and then we'll take out the pen and Then the box is empty. There's nothing else. I'm going to just you know close it and Set it aside Okay, so now let's look at the pen So the first thing I'm gonna have to say that you know I'm surprised the quality you're getting given. This is such a such an inexpensive pen So it doesn't feel any way, you know anywhere that way and it's not even plastic this is definitely metal and then It's black the barrel is black and metal and the clip feels like metal too So I'm going to just you know open it and let's see How it looks here Okay, so what you have to do for the first time You're gonna have to actually insert the Refill just try this way to see if this works because you know, I'm not sure this is gonna work I haven't used this type of pen before so what it looks like, you know, they already had another refill inside and This one was just right here and then So they're like, you know all together three three sets of a partage In order to stop start using this so I'm going to just like, you know, put it this way So when I slide it in then it feels like, you know, it just like you know kind of I heard a slight click So I'm going to just leave it that way and I'm going to just like to tighten it to see if this works So this review is a true review of which all my reviews are what it means that you know I haven't is this product before I haven't mastered the function of the product before so what you're seeing is Really how you're going to react when you see the open this for the first time in your life Okay, so here It feels like that, you know, it touched properly. So I don't know if it's going to start writing So I'm just trying to, you know Start writing but I don't see anything happening here Okay, so I don't see it's writing yet So I read the instruction manual a little bit and they're saying to you know, squeeze this a few times So let's see if that does anything. So what I'm doing right now is You know squeezing this but still I don't see any results Okay, so I'm putting a little bit more pressure now Okay, so finally it starts writing. So let me just you know close this So it takes a while for the ink flow to come through. So what I did You know, I just kept Squeezing it and squeezing it and then finally although you cannot see here So, you know, there's no anywhere you cannot see that there's ink coming in but the ink flow is working So you have to just like, you know, be patient for the first time and just you know Keep squeezing it and push it through all the way and then once you have your first, you know writing Then if you just keep writing then it writes very smoothly So I'm going to set this aside here and let's just do our writing test So I'm going to take my notebook and We'll see how it works. So I'm surprised that, you know, it's writing so smoothly as you can see right here and I even actually not feeling that I'm using a Fountain pen. It just feels like a nice ballpoint a very smooth writes very nicely so I'm really surprised with, you know, the overall quality and the craftsmanship and The material and the in quality and everything of this pen. So definitely this is, you know Although it's about $13 Canadian, but definitely the value you get out of this each The value you get out of this is much more than, you know, what you pay for. So for that reason, definitely, you know I'm Happy with the product So thank you for watching this video Forget about subscribing this channel forget about like this video. There'll be more videos coming up So I'll see you shortly. Thank you


For more than 70 veterans were on Mantrap Lake for the third annual Walking on Water event. Lakeland News reporter Sherell Moore tells us how the day of fishing is impacting our servicemen and women. We take older vets, disabled vets, veterans from all branches and we get them back out on the ice. It's hard to draw veterans out and this is one of the really good ventures for doing that. Walking on water was started by a group of friends from Park Rapids about 3 years ago. The goal was simple, get our servicemen and women out in the great outdoors. I have not been ice fishing for 10 years so I get out here today and he says, there's a flag up, do you want it? So we'll get on out there and was able to pop a 31 inch northern. The first Walking on Water event had about 25 vets show up. This year there are about 70 to 100 vets from all different branches and all different eras. The oldest was about 93 years old. The vets are given the gear and they even get a free lunch. Most importantly, they get companionship. So we started taking vets out fishing and we noticed a big change in who they were, a big change in how they lived their life. Depression started to kind of fall beside, we started to make relationships with guys. When you get a group of veterans together there's a camaraderie that builds in you know it's nice to be around fellow soldiers that are served and fellow service members. Walking on Water says the event is possible because of the community. Over 70 volunteers showed up to help over the weekend and nearly everything is donated from the fish houses to the fishing poles. Really without the community stepping up and these people bringing their houses in this event doesn't happen. Walking on Water hopes to grow by bringing out even more vets in the future. Sebert says there are about 2,500 who live in the area and he would love to see them all. You know we're all brothers and sisters in arms, regardless of what branch we're in, what war we're in, how old we are, we all have this common bond and to be able to sit there and be around our fellow veterans that's what it's all about. Reporting from Mantrap Lake, Shawmore, Lakeland News. About 25 fish houses were donated to this year's event and to learn more about the events put on by Walking on Water, you can follow them on Facebook. If you enjoyed this segment of Lakeland News, please consider making a tax-deductible contribution to Lakeland PBS.


What's going on everyone Sam here late in sports cards or been one box of 2022 Pini select the UFC H2 For Joe P. So good luck here Joe. See what we got buddy And whatever you would like Peter go right on ahead got after this Four orders in queue, but nothing that's gonna take super super long. I don't think Silver Vincent Luke or luck Well, it's her weight Yeah, same here honestly Kyle pulled a green. That's the lowest I pulled like green once It's a lot of Sonya concourse on the disco red is Chris Daukis 34 out of 99 Luke. Hey, thank you Luke. Hey, that's why I don't call myself the biggest UFC fan in the world I'm not hundred percent sure on all the the fighters Nades nice one there on the octagon side and last pack for you here Did I play a green? Who what green was it? Michael Bisping announcing legend and Macy Chasson on the premiere level that'll do it for your box there Joe congrats on the cards man We'll get them right out to you. Thanks again, buddy