The title of our sermon this morning is God Glorifying Giving, God Glorifying Giving. We've looked at generous giving, we've looked at faith-filled giving, now we come to God Glorifying Giving and all this from this text of Scripture in 2 Corinthians today specifically, 2 Corinthians chapter 9 verses 12 through 15. Now this morning, we arrive at the conclusion of Paul's treatment Christian giving from chapters 8 and chapters 9 of 2 Corinthians. It has been a joy and a blessing to have the time that we've had, a little over two months working verse by verse through these chapters in God's Word, essentially building or developing, cultivating a theology of Christian, distinctively Christian giving.  Now Paul warns us in chapter 6 verse 1 not to receive the grace of God in vain and it would certainly be receiving the grace of God in vain to allow the seed of God's Word contained in these two chapters to die in the unwelcome soil of a forgetful mind or an indifferent heart. Our prayer, brothers and sisters, for the glory of His grace must be God make us generous people, make us generous givers. As we open this last section of text together, the setting of our passage should be very familiar to us by this point. In the providence of God, many of the saints in Jerusalem have fallen on extraordinarily difficult times with the influx of pilgrims from all over Judea, the explosive growth of the new church and with the blistering effects of widespread persecution on the church, many believers in Jerusalem find their faith in the Lord Jesus Christ being fiercely tested by extreme circumstances, by extreme poverty. The response of the Jerusalem church herself has been overwhelming. We read much of that account in the book of Acts. In Acts chapter 2 verse 44, all who believed were together, all had all things in common and they sold their possessions and goods and divided them among all as anyone had need. In Acts chapter 4 verse 32, they rose to the occasion. The multitude of those who believed were of one heart, they were of one soul. Neither did anyone say that any of the things that he possessed was his own, but they had all things in common. They were meeting the needs of their brothers and sisters in the church. In Acts chapter 4 verse 34, all who were possessors of lands or houses, they sold them, they brought the proceeds of the things that were sold, they laid them at the apostles feet and they distributed to each as anyone had need. In other words, the saints in the church at Jerusalem were not abandoning their brothers and sisters there and waiting for the Gentile churches in Macedonia or Achaea or Galatia to give. No, they were giving to the need. They were doing all that they could. They were meeting the needs of their brothers and sisters. However, as the resources of those in the church began to wear thin, which they did, it was apparent, obvious, that additional help would be needed from the extended body of Christ. And so the apostle Paul, in his missionary journeys, as he labored for the spread of the gospel through Syria, across Galatia in the Macedonia down into Achaea, there remained within his heart an earnest desire to remember the poor and suffering saints in Jerusalem. And so Paul begins what is often referred to as the collection. It's also referred to as the gift, the blessing, as we've heard the fellowship of the ministering to the saints, the many ways in which Paul refers to this collection of money for the poor saints in Jerusalem. He mobilizes the predominantly Gentile churches outside of Judea to pool together their resources to provide a generous gift for the predominantly Jewish Christian church in Jerusalem with many blessed effects that we've seen. In 1 Corinthians, chapter 16, verse 1, Paul is already enlisted the help of the churches in Galatia and now he asks the church in Corinth to begin laying something aside. And as they gather for worship on the first day of the week, that's when they worship together. They worship on the first day of the week. In addition to the tithes and offerings given in support of the church, the believers in Corinth are exhorted to store up as they may prosper for the needy saints in Jerusalem. And as the collection in Corinth began, however, simultaneously serious problems began to grip the church at Corinth and the collection stalls. Now as we come to 2 Corinthians, chapters 8 and 9, the church appears to be through those significant problems, many of those we've already spoken through as we work verse by verse through this book. The church appears to be back on track to a large degree and Paul then now circles back around to remind them of their commitment, to remind them of their desire, to remind them of their responsibility to give. Now you'll notice having worked through these 2 chapters that Paul doesn't manipulate them. He doesn't coerce them. He doesn't strong arm them. He doesn't have to. He's not going to. He appeals to these brothers and sisters on the basis of their faith in the Lord Jesus Christ. He appeals to them on the basis of God's grace, the grace that has been poured out on them. He appeals to them on the basis of God's love and that love preeminently displayed by the Lord Jesus Christ in his own sacrifice of his own self on the cross for them. He appeals to them on the basis of that sacrificial giving of God in the gospel and he informs their faith and then challenges them to give based on what they know to be true. In other words, he gives them theology. He gives them good theology, good instruction from that theology. He exhorts them and he appeals to them on the basis of faith working through love. Now he begins all this by drawing our attention to the lavish example of grace fueled giving on the part of the Macedonian churches in chapter 8 verses 1 through 6. He then continues with a confident exhortation to gospel shaped giving in chapter 8 verses 7 through 15. We meet the faithful envoys of the churches sent to organize this collection in chapter 8 verses 16 through 24 and beginning in chapter 9 we are given helpful explanation then for why they should follow through with its generous and sacrificial God glorifying gifts. The Lord of the harvest says to the church in Corinth and the Lord of the harvest says to us so bountifully brother so bountifully sister and you will reap bountifully that's not word faith heresy that's a promise from God's word amen so bountifully and you will reap bountifully given faith given joy given hope given love because God loves a cheerful giver and God the one who is the ultimate the most cheerful the most willing the most sacrificial the most freely the most loving giver that there is is able to make all grace abound toward you that you always having all sufficiency in all things may have an abundance for every good work amen that's a promise from God now as Paul brings this section of this letter to a close now having considered the outpouring of God's grace on the Macedonians having considered the testimony of the sacrificial giving of the saints of God the love expressed by the churches for their brothers and sisters in Jerusalem having considered the unity cultivated by the fellowship of ministering to one another in the body of Christ the need that food on the table a roof over their head closed on their backs the poor provided for blessings poured out on the cheerful giver having provided an example having provided exhortation having provided explanation Paul now looks beyond all of that beyond all of that to the ultimate end of our giving the ultimate spring from which every good and perfect gift flows and terminates our giving the giving of God's people upon the glory of God and the person of the Lord Jesus Christ that's exactly where it belongs doesn't it everything ends everything terminates everything comes to the glory of God that's as the Lord would have it that's what we're created for right that's what we labor for that's where our affections terminate our desires terminate the glory of God and the person and work of the Lord Jesus Christ there are four verses in this brief section of text and with them four points and I want you to see that the generous giving the generous giving of God's people that terminates in the glory of God is giving that one promotes our gratefulness promotes the gratefulness the gratitude of God's people to that giving which terminates in the glory of God is giving that promotes his glory goes without saying we'll look at that from the text thirdly it's that giving which promotes our unity and fourthly it's giving that promotes his grace promotes our gratefulness that promotes his glory it promotes our unity and it promotes his grace now as the people of God as we consider this subject of Christian giving we're to look beyond the practical effects those practical effects are important right we're to look beyond the practical the temporal the physical the material blessings or benefits we're to look beyond those things those things are important they have their place and the Lord uses the giving of his people as a means through which he provides for those needs they're important but we're to look beyond the practical effects we're to look beyond the practical benefits we're to look beyond the people involved we're to look beyond even the immediate purposes involved and we're to look to the one for whom we give right we're to look to him when you give as the people of God you're to look to him to his glory to his ends his purposes his cause you're to look to the giving of the Lord Jesus Christ right your eyes are focused on him when you get your eyes sort of out of the dirt the mud of our existence and you lift them into the heavens you will be a God glorifying and generous Christian giver amen we're to look to the one for whom we give now note with me first that God glorifying giving is giving that promotes the gratefulness of God's people it's giving that promotes the gratefulness of God's people look with me at verse 12 Paul says in verse 12 for the administration of this service that's what he's calling the collection the administration of this service not only supplies the needs of the saints not only meets their needs but also is abounding through many thanksgivings to God now verse 12 reveals a twofold purpose for the collection one material and the other spiritual we might call it provision and praise right twofold purpose for the collection provision and praise material and spiritual right he begins by referring to the collection as a diakonia a diakonia is translated here as administration that word in your new king james the greek word from which we get the word deacon we have deacons in this church we're in the process of looking at selecting more deacons deacon is one given the office or set aside to a ministry of service in the church diakonia service in the church now Paul couples that word administration diakonia service he couples that word with the word late or ghiyas which is translated here as service late or ghiyas is where we get our english word liturgy or liturgical these words i think are important for understanding of what's being communicated here this word is a compound word and refers to combine two words public and work it means a public work okay it's a compound word meaning a public work or a public service this word the word where we get our word liturgy or liturgical points back to the old testament service of the priests in the temple when they offered a public service a public service of ministry in the temple to god's people they would offer up sacrifices to god on behalf of the people it was a late or ghiyas it was a liturgical work okay when the when the poor Philippians the Philippian church in Macedonia when the poor Philippian church sacrificially gave the meat Paul's needs time and again Paul called their gift a sweet smelling aroma an acceptable sacrifice well pleasing to god where did he get that language from it came right out of temple service temple sacrifices this was temple work a public service they led to or ghiyas so to speak that rose to god as a sweet smelling aroma and acceptable sacrifice right as much as their gift then was the means by which Paul's physical needs could be met their gift these words combine to give the effect that their gift was also an act of worship and an act of praise that was well pleasing to god we get the two concepts married together right provision and praise work and worship so even in the two words that Paul uses here two words that Paul uses even in these two words you can see the two fold purpose for it it is a ministry this collection is giving this generosity is a ministry of public service it's going to provide for the needs of the saints it's a service of public ministering if you want to say it that way it's an act of provision and it's an act of praise now when you and I give in the church when we give it is an act of provision and it is an act of praise you see it is an act of supplying for the needs of the work of the ministry keeping the lights on keeping the mortgage paid keeping the people employed right and it is an act of worship it is an act of praise it is a part of our worship that's why we don't relegate giving to a box in the lobby or a mail-in slip right it's it's a part of our normal worship of the lord on the lord's day so ministry of public worship and public work right now paul explains that further in verse 12 he says the administration of this service not only does it supply the needs of the saints but also is a bounding through many thanksgivings to god right now we see this the same coupling here not just in those two words but now we see the same coupling of provision and praise in the phrases the clauses that follow your generous giving not only meeting of physical needs for a physical people in a physical place suffering physically okay but the ultimate end of your generous giving is an overflowing gratitude toward god provision and praise yes you meet the needs of the saints yes but the effect of the giving the effect of the giving is multiplied not just meeting the needs of the saints the effect of the giving is multiplied it abounds it overflows because of the flood of gratefulness that pours from the heart and prayers of god's people provision and praise you see it's like the lord multiplying those loaves and those fishes on the side of the sea in galley right he multiplies it we give certainly meets the needs of the saints but that giving that generosity multiplies it abounds it overflows in worship and praise for god when that's done in a god glorifying manner provision and praise and when those dear brothers and sisters in jerusalem when those who are suffering there for the cause of christ when those dear brothers and sisters receive this gift they're going to look to the love shown to them by their brothers and sisters in these gentile churches and they're going to thank them from the bottom of their heart for this gift right they're going to look for their brothers and sisters many of these they don't know they've never met them they're separated miles apart and yet there's going to be a knitting of their hearts together right a love that is going to be expressed toward them thank you what a generous gift right they've loved us in this way they're going to look to paul and they're going to say paul brother the one who persecuted the church look at the love that you have shown us the care that you've shown for us in organizing this collection paul thank you right thank you for this gift they're going to rejoice that their needs are met right i'm going to be able to eat more than one meal this week right there's going to be food on the table paul our needs are met but ultimately ultimately those dear saints in jerusalem when they receive this gift they will look beyond the provision they will look beyond the gift they will look beyond those who gave they will look beyond those churches they will look beyond paul who organized the collection and as they recognize behind the collection behind those people behind paul stands the immeasurable grace and love and kindness of god our provider he's the one who supplies all our need amen and they will erupt in praise and thanksgiving to him god is the one god is the one who gives us all we need god is the one who supplies our need now he may use means to do it but it's god who does it okay he's the one he's the one who ultimately is worthy of our gratitude worthy of our praise worthy of our worship god is the one who works through his providence to supply the means for men to generously give if you can give it's because god has prospered you praise god right god is the one who works in the heart of men by his spirit according to his grace grace to cultivate within them the heart that desires to give the heart that wills to give the mind that wants to give god is the one who works through his people to demonstrate his loving care his compassion his kindness his provision his grace and god is the one who has given to them yet again and they will proclaim those brothers and sisters in Jerusalem will proclaim with james that every good gift and every perfect gift is from above it comes down from the father of light with whom there is no variation or shadow of turning and they will offer to god the spiritual sacrifices of praise and thanksgiving to him which are they sweet smelling aroma to god right see it all comes around it all comes around doesn't it it's interesting one commentator referred to this as a circle of grace a circle of grace many times this chapter we've talked about this in chapters 8 and 9 this is referred to as a grace of god they're giving as a grace they're giving as a grace kary's kary's is the word referring to grace they turn then the people of god then turn and give grace kary's a gift kary's god begins with kary's they give with kary's and that erupts then in you kary's thea thanksgiving the circle a circle of grace there's a an unbroken chain if you will that ends terminates in always the glory of god generous giving glorifies god hebrew's chapter 13 verse 15 therefore by him therefore by him let us continually offer the sacrifice of praise to god that is the fruit of our lips giving thanks to his name notice with me that this giving generous giving not only promotes or cultivates the gratitude of god's people but it also promotes the glory of god it promotes the glory of god look at verse 13 Paul says while while through the proof of this ministry they poor saints in Jerusalem mentioned in verse 12 right they glorify god for the obedience of your confession to the gospel of christ and for your liberal sharing with them and all men new king james adds the word men there in italics right that means that that word is not supplied there by the greek it ends in all right your liberal sharing with them and with all all believers all saints we'll talk about that right now paul mentions in verse 13 he mentions the proof of this ministry while through the proof of this ministry this service their generous giving is proving something okay it's giving evidence of something we have to ask the question what is it that's being proven their service this act of generosity is proving something what is being proven now certainly paul said in chapter eight verse eight that he was testing the sincerity of their love by the diligence of others so one of the things that's being proven by their faithful giving their generous giving is their sincere love right they prove their love by giving generously giving sacrificially giving the way that god has called him to give okay but it goes farther than that it goes farther than that and i want you to see this what their generous giving proves causes the saints in jerusalem to glorify god okay it's through the proof of this ministry that they the poor saints in jerusalem glorify god so whatever it is that they're giving proves it causes the saints in jerusalem to glorify god and it's proven it's proven by two very important pieces of evidence one it's proven by the obedience of their confession to the gospel of christ and two it's proven by their generous or yes generous fellowship koinonia is the word proven by their generous fellowship not only with the jerusalem saints but with all believers with all the saints now the Corinthians predominantly Gentile believers had made a profession of faith in christ it's their confession to the gospel of christ reference there in verse 13 their generous giving demonstrated an obedience to that profession that confession of faith okay and a fellowship in that profession not only with the saints of jerusalem but with all saints that's what they're giving is doing now let's answer our question okay think it's extremely significant that this was the very same reaction that we see the jewish elders of the jerusalem church give when paul goes to visit them in ax chapter 21 the poor saints in jerusalem when they receive the gift they glorify god because of the obedience of their confession and because of their generous fellowship with them and the elders the jewish elders of the jerusalem church give the very same reaction when paul visits them in ax chapter 21 listen to this from ax chapter 21 beginning in verse 17 where luke says when we had come to jerusalem the brethren received us gladly on the following day paul went in with us to james and all the elders were present and when he had greeted them he told them in detail those things which god had done among the Gentiles through his ministry now what were the things that god had done among them through his ministry salvation right salvation has come to the Gentiles right god has granted even the Gentiles repentance which leads to life okay they've been saved the Gentiles are being saved pouring into the church through paul's ministry and look at what they say in verse 20 and when they heard it what did they do they glorified the lord now what are they glorifying god for they're glorifying god for the genuineness of their faith the genuineness of Gentile faith in the lord jesus christ right the genuine faith of these Gentile believers now think with me there is really good reason to glorify god for this very thing right Gentiles who were once far off i think virtually all of us in here are Gentiles okay we were once far off Gentiles were looked down upon by the jews called the uncircumcision by these jews in jerusalem most likely by these very jews in the jerusalem church who are now followers of the lord jesus christ at one time looking down upon these Gentiles as uncircumcised unbelievers right they were described Gentiles described as aliens from the commonwealth of israel strangers from the covenants of promise having no hope and without god in the world that describes every one of us outside of christ doesn't it you are stranger an alien from the promises you are without hope and without god in the world but praise god when the lord saved you he brought you near by the blood of christ the sufficience chapter two that's worth glorifying god for amen now god has always intended to do exactly that god always intended to save a people to his name and for his worship from every tribe every tongue every people every nation relations chapter three verse eight says this and the scripture for seeing that god would justify the Gentiles by faith preached the gospel to abraham the father of the jewish nation right abraham way back in the old testament saying in you abraham all the nations of the world shall be blessed this was something that was mysterious to the jews under the old covenant doesn't mean when it says that it was mysterious it doesn't mean that it was unknowable right it means that it was dimly revealed in the old testament and now gloriously revealed in the new testament and i want you to see that from Ephesians chapter three turn there with me Ephesians chapter three if you're looking at Ephesians chapter three if you just go back a couple of paragraphs you see the setup for this in Ephesians chapter two that we just referenced look at verse 11 therefore remember that you once Gentiles in the flesh who are called uncircumcision by what is called the circumcision made in the flesh by hands that at that time you were without christ being aliens from the commonwealth of israel strangers from the covenant of promise having no hope without god in the world but now in christ jesus you who are once far off have been brought near by the blood of christ for he himself is our peace who has made both one he has broken down the wall the middle wall of separation having abolished in his flesh the enmity that is the law of commandments contained in ordinances so as to create in himself one new man from the two thus making peace that he might reconcile them both to god in one body through the cross thereby putting to death the enmity and look at Ephesians chapter three verse one paul says in light of that truth of what god has done paul says this in verse one for this reason i paul the prisoner of christ jesus for you Gentiles if indeed you have heard of the dispensation of grace of the grace of god which was given to me for you how that by revelation he made known to you to me the mystery right as i have briefly written already by which when you read you may understand my knowledge in the mystery of christ verse five which in other ages was not made known to the sons of men as it has now been revealed by the spirit to his holy apostles and prophets here it is verse six that right that the Gentiles should be fellow heirs of the same body and partakers of his promise in christ through the gospel glory to god right glory to god of which paul says verse seven i became a minister according to the gift of the grace of god given to me by the effective working of his power to me paul says who am the less than the least of all the saints this grace was given that i should preach among the Gentiles the unsearchable indescribable inexpressible infinite matchless superlative riches of the lord jesus christ and to make all fever sign what is the fellowship the fellowship of the mystery which from the beginning of the ages has been hidden in god who created all things through jesus christ to the intent that now the manifold wisdom of god might be made known by the church to the principalities and powers in the heavenly places according to the eternal purpose which he accomplished in christ jesus our lord in whom now we have boldness and access with confidence through faith in him therefore i ask that you do not lose heart at my tribulations for you which is your glory right glory to god this is the mystery now being revealed and interesting isn't it right if we think about this this act of generous giving on the part of the people of god how this glorious truth this matchless truth that erupts paul just erupts an exuberant praise over this truth this truth is revealed in something seeming to us so simple as a gift of a Gentile church in Corinth to a needy Jewish church in Jerusalem right and it communicates that reality glory to god right glory to god when we when we obey the lord when we seek to live for him fervently in devotion with affection right with diligence and with earnestness in faith these eternal realities are brought to bear in just these even these simple acts of love that you a once rebellious wicked sinner at enmity with god a child of wrath like the rest now because of the grace of god poured out to you and the lord jesus christ you can offer up acts of praise and acts of worship that are acceptable on the site a sweet smelling aroma it displays the matchless wonder and the glory of god in the gospel and one day when you stand before him at the judgment seat of christ it'll be those acts of praise those acts of worship that god will look at you and say that was the work of my spirit in him by virtue of the finished work of my son the lord jesus christ and your works will be seen to praise honor and glory him glorify him amen in revelation chapter five all these together now sing a new song saying you are worthy when we glorify god right god doesn't get more glory when we glorify him right he has all the glory he is inherently glorious so what does it mean when we say we glorify god it means we ascribe to him worth we ascribe to him praise we ascribe to him honor we ascribe to him majesty we reflect his goodness his compassion his kindness his mercy his grace right we ascribe to him the glorious attributes that are due his name and when you see this in revelation chapter five verses nine through ten when they sang a new song this group this community together said you are worthy lord jesus christ you are worthy to take the scroll you are worthy to open its seals for you were slain and have redeemed us to god by your blood out of every tribe every tongue every people in every nation any of you and you have made us kings and priests to our god and we shall reign on the earth all of them together all of them together jew gentile every tribe every tongue every people every nation glory to god by glory to god that was god's purpose from the beginning from the beginning and this is what the lord has accomplished through our lord jesus christ and we are to glorify god for it paul says doesn't he owe the depths of the riches both of the wisdom and the knowledge of god how unsearchable are his judgments in his ways path finding out and any attention any attention given to social or ethnic distinctions that would serve to foment division among the people of god or undermine undermine that unity that precious unity that we have in the lord jesus christ is tantamount to the sin of the judaizers it is to be damned should be condemned outright beware the propagators of social justice beware the foul plague of racism these walls of separation are down in the church they have been down all glory to god all glory to god now this reality this truth the the glory of god in the gospel of jesus christ is being displayed before the eyes of those poor and needy saints in the primarily jewish church in jerusalem when they receive this generous gift from the primarily gentile churches of galatia mastodonia and a kaya you can almost hear the saint in jerusalem can't you saying wow what an amazing and generous gift where did you say this came from well where did you get this from the gentile churches praise god really the churches in matthew we know how poor those people are the churches in mastodonia gave praise god for the gospel praise god for jesus christ it causes cultivates promotes the glory of god it should if we're thinking rightly about these things right back in second chrithians chapter 9 verse 13 notice the connection notice the connection right on what basis in verse 13 on what basis do the jerusalem saints glorify god for this fact on what basis do they glorify god they glorify god on the basis of their obedience the obedience of their confession right think with me it's based on the obedience of their confession it's seen in their fellowship with them through this act of generous and god glorifying giving in other words their generosity was seen as evident that their profession of faith in the lord jesus christ was real it's seen as evidence what is proved by this ministry is their genuine faith in christ that's what's proved right it was a mark of the genuineness of the conversion that god had poured out on these gentile believers okay now it by implication we need to understand that without evidence without proof you have no reason to believe that your profession of faith is anything other than a sham without evidence without marks without proof so to speak you have no reason to believe that your profession of faith is anything more than a deception james asks do you want to know oh foolish man that faith without works is dead as the body without the spirit is dead so then faith without works is dead also someone's lying on a pavement motionless you're concerned what do you look for as evidence that person is alive you look for a pulse right james says body without the spirit is dead as the body without the spirit is dead so faith without works is dead also you want to know that your faith is genuine you want to know that your profession is genuine is real your conversion is genuine you look to the evidences of conversion the evidences of genuine saving faith we are called in the gospel when called in the gospel we're called to turn from our sin we're called to put our faith and trust in the lord jesus christ we are to entrust ourselves to him and follow him by faith right so we are called in the gospel then to faith love and obedience faith love and obedience without faith is an impossible it is impossible to please him right we're to love the lord our god with all our heart soul mind and strength and he who says i know him but does not keep his commandments is a liar and the truth is not in him right our actual faith our actual love our actual obedience then is clear evidence of our righteousness before god no no it's clear evidence that the spirit of god is at work in the heart of that center by grace through faith spirit of god is at work when the spirit of god is at work the spirit of god produces evidences produces fruits the bare witness that our faith is genuine so what do they do when this right in this gift what do they do when the power and grace and mercy of god is displayed before their eyes in this generous act of giving on the part of these on this Corinthian church the church is in Galatia the church is in Macedonia what do they do they glorify god they glorify god not that they add to his glory they ascribe glory to him they worship him okay now beyond promoting our gratefulness beyond promoting his glory you can see can't you how generous god glorifying giving promotes our unity right unity unity you can certainly see this in the beautiful unity within the bride of christ the church as a result of the gospel we've just talked about but look further with me at verse 14 verse 14 and by their prayer for you okay by the prayer of these saints in Jerusalem by their prayer for you they glorify god right by their prayer for you they glorify god who long for you because of the exceeding grace of god in you now with respect to verse 14 when we cheerfully willingly lovingly and generously give we deepen our experience of spiritual union and fellowship with other believers in the body of christ the lord by his spirit just wondrously knits our hearts together right we deepen our experience of unity we deepen our experience of communion with other believers with that believer that is helped with other believers like the grinty and say with all men right and it's all back to the grace of god this section began with the grace of god poured out on the churches of macedonia and here it ends with the grace of god poured out on the church at Corinth verse 14 because of the exceeding grace of god in you so when the Jerusalem saints right received this gift at the hands of their brothers and sisters it's not received merely or only as meeting their physical needs they look beyond that they will see the gift as a work of the grace of god in them and that shared grace has the effect of knitting them together in christ it's amazing amazing what the lord accomplishes when the people of god obey him and love him and serve him and specifically with reference to this text when they generously give right now they will perceive grace in you they will perceive grace in you when you given this way and there are two benefits of this two benefits of this one it produces a unity a kindred spirit we would say right it produces a unity in the saints a longing for those in Corinth the word is epipathet oh a deep yearning a deep yearning that arises from sincere affection arises from love a deep longing an intense yearning so one benefit is this unity right this longing for one another the second benefit is that that longing then produces prayer and it produces prayer which glorifies god what further unites them even though they are separated by miles in between them what further unites them is that that longing for them gives birth to supplication gives birth to petition gives birth to intercession gives birth to thanksgiving it gives birth to prayer and prayer further unites them right we're united to one another when we pray for one another can't be lost on us right can't be lost on us we need to pray for one another if you find yourself at odds with someone do as much it depends upon you to resolve that conflict but then pray pray for them you want to grow grow in your love for your wife men pray for her you want to grow in your respect for and your submission to and your love to your husband ladies and pray fervently for him you want to see the lord work in the lives of your kids pray pray this longing that they have for other believers the longing that you may have to have a god glorifying marriage the longing that you may have in your heart to see your kids save that longing should burst supplication and petition and intercession and prayers of thanksgiving and desire your heart should be poured out to god in prayer right it's that deep intense yearning and longing that produces then prayer and it's that prayer from that heart independence upon god that glorifies him that longing is produced by the grace of god at work in their hearts right this is no dispassionate indifferent cold or heartless or meaningless relationship when you think about it right with respect to our church for example right what draws you to the people that you long to have fellowship with to the person that you want to spend your time with you say yourself how i'm going to call that brother i'm going to call that says i'm going to spend time with that person what draws you to them what is it right the people that you choose to spend all your time with the people that you choose to be discipled by what draws you to them is it is it common ethnicity that's where clicks come from right think about like ethnic clicks and how not good that is is it ethnicity that draws you to one another i always think about that right think carefully about that is it a is it a common perceived oppressor in other words now and we see this all over our country don't we i'm in this victim class of people and i am the victim together with all these other people and we all have a common enemy a common oppressor right is it is it that that draws you to one another is it that that you're gathered around or collected together by is it socioeconomic standing are you drawn to other people because they look like you or act like you would it be other interests outside of christ is it other things outside of christ that draws you to them people that you would choose to spend your time with why do i choose this person rather than that person to be a close friend to me to spend my time with why am i drawn to this person rather than this person right or do i choose am i drawn to the people i choose to spend my time with because of the exceeding grace of god in them is that what draws me to them verse 14 by their prayer for you who longed for you why why are they longed for them because of the exceeding grace of god at work in them is that what draws you to another person that should let it be that brother let it be that sister right think carefully about who you spend your time with who you're drawn to what does that say about you about your heart about your mind about the way that you think choose the good thing right so generous giving promotes our unity promotes his glory promotes his gratefulness and generous giving then glorifies god by promoting his grace by promoting his grace so having now spoken at length about the manifold blessings of his grace poured out on the people of god through god glorifying faith filled and gospel informed giving paul then turns his attention to the eternal spring from which all grace flows and that is the lord jesus christ in verse 15 where paul says thanks be to god for his indescribable gift the best description of this gift is that it is indescribable right the best way that i can describe this to you is that it can be described to you right it is inexpressible we don't have the language to work it out right every operation of grace in the masonians every evidence of grace that is displayed in the loving generosity of the carumpians paul traces it all back to its spring to its fountain head to its origin to the very source of all that grace which is the person of the lord jesus christ and so he ends this section on generous giving in exuberant praise for the ones who has given everything to redima thanks be to god for his indescribable gift what gift is he referring to he's referring to the father's indescribable gift is the gift that is given to the poor st. jerusalem describable yes we've been describing it for a while what is that good and perfect gift which is matchless which transcends human language it is the gift in grace and mercy of the person of his only begotten son for sinners like you and me that's the indescribable gift right the gift of his only begotten son for guilty sinners one has said that paul's mind cannot too long be occupied with christian giving before he must trace the stream of all giving back to the flowing fountain of god's own heart displayed in the gift of his son to sinners first john chapter four verse nine in this the love of god was manifested toward us that god has sent his only begotten son into the world that we might live through him in this is love not that we love god but that he loved us and sent his son to be the propitiation for our sins beloved then right in response if god so loved us we also ought to love one another and they do right this gift collected by paul from the churches in macedonia the churches in galatia churches certainly in siria and in akea this gift is an act of love it is faith working by love to the glory of god at the end of the day at the end of the day the ultimate motivation to the generous disposition of heart that gives in such a way as to glorify god has its foundation in a growing understanding of appreciation of an affection for the glory of our lord and savior in his giving right it has its foundation in that gift that indescribable inexpressible gift and as we behold him and as we behold the father who sent him giving so generously so lavishly so sacrificially in love we then give to glorify him amen so let your gift let your giving glorify god right let your generosity be such that it magnifies the grace of god in christ that's the ultimate end certainly we're going to meet a need right certainly we're going to we need to keep the lights on certainly we need to we need to have the materials that we need to preach the gospel right we need to employ people to help us in that good work certainly we'd have these practical temporal physical material needs the brother sister beyond that certainly give give give generously give sacrificially but give in such a way that brings glory to the god who gave so richly to you and i so we consider the end of these two chapters i want to ask us together has this instruction been taken to heart has it found root in your heart and in your mind the only way that we know is when it's tested paul would say brothers and sisters i'm testing the sincerity of your love give generously be a generous giver in all praise honor and glory to the one who has given so lavishly to undeserving sinners like you and i let's pray pray silently go before god consider how you would apply this text in your own life in your own heart ask for help by god's spirit we can't do this in our own strength and determined by faith to follow him in it when you're done praying your artistness let's pray


Good day fellow investors! I continue with my modern perspective on the intelligent investor because that book is filled with everlasting investing wisdom. We just have to apply it to the current market and see what we can learn. So today we're going to talk about chapter 7 and which discusses where can an enterprising investor, thus most of you that watch this video, find investment opportunities in any market. There are four things that an enterprising investor has to focus on. Buying low and selling high growth stocks, bargains and special situations. The buying low and selling high will be discussed in the most important chapter of Graham's book chapter 8 which will be in the next video that I make about the book so please subscribe and today we're going to focus on other issues and I will use stock market examples to explain in a better way. Now first what Graham discusses are growth stocks and he defines growth stocks as one as a stock that has grown better than the average and will continue to do so. We would all love to have invested in Netflix a few years ago or to find the next Netflix to invest in. The problem with growth stocks is twofold. Usually when a company shows growth it is overpriced, there is hype around it and you have to pay a big price so even if you're right on the growth you might never see good investment returns because you overpaid. The second thing is that nothing can grow forever and if nothing can grow forever sooner or later that growth stops and then you see the stock price crash. Graham statistically analyzes returns on investment in growth stocks and finds that those are not good and I have also made a video in the card above growth stocks versus value stocks and we have seen that value stocks outperform growth stocks by about three to four percent per year and that has been the case in the last 90 years. However there is a lot of debate there there can be something growth and value which is what I'm looking for. So please subscribe to the channel because there will be a lot of stocks that we discuss like the Chinese stocks that had both growth and both value. And then another problem with this long term growth stocks is holding to them. Let's see the Apple case. So Apple stock was at one point forty eight dollars in 2003. Now it has one hundred eighty seven dollars. It hasn't been linear growth. There was a huge drop in 2008 2009. There was a huge drop in 2013. Another huge drop drop in 2016. So you might see all these returns. There was another drop in 2006 I believe. So you might see these returns and I don't know a person who bought in 2003 because they saw what Apple is doing and what it will do. So it's very rarely that people held for such a long time. And this is another problem with growth stocks. You never know when to get in get out should you keep hold it is the trend over or it will grow even more. And that's something very difficult that practically nobody knows. So at the end game it's just a bet because there were some other examples better than Apple at that time. The growth stocks in 2003 2004 2007 were different not Apple. Blackberry was the king of the market in 2008 alongside Nokia. However you see that their stock price is now what not even a tenth of what it was in 2008. So Graham is against investing in growth stocks because it's simply not what the intelligent investor does. However I pretend to prefer growth and value when combined but then it's again a value stock. He has different concepts that we have to look at it which are the following. So he recommends the unpopular large company something Peter Lynch also looked at bargain issues and special situation. So as the market is hyped over the Netflix's over the Amazon's over OK Apple's was Apple was more of value play there because of the lower valuation. It this regards big companies that are in temporary trouble. However we have to really be careful with the temporary. We have to see OK. Is this company just in temporary trouble or it is a long term trouble. The good thing is with big large companies in temporary trouble is that they have the capital they have the know how and they have the possibility to grow make acquisition and get out of that temporary route. A company that was in temporary trouble just two years three years ago is Walmart. It was trading at below 60 just to jump up to above 100 in the last few weeks. Graham's strategy with out of favor stock is simple buy blue chips that have the lowest price earnings ratio and are currently out of favor. However be careful with that and cyclical cyclical companies like car automotive companies. They have when everything is good they have extremely high earnings low valuations because people expect that in a recession that will change they will have low earnings and high valuations and low stock prices. So be careful with cyclicals cyclicals and this temporary trouble approach low price earnings ratio always apply common sense. But Graham show statistical data where if you would buy the cheapest stocks in the Dow Jones index your return would would highly outperform the market. Then the second thing Graham talks about our bargain issues. He says that the bargain issue is one that's trading below the intrinsic value of the stock that has a margin of safety that is more valuable to the private owner. All tools discussed in my book Modern Value Investing and then Buffett continues in the temporary clouds environment with this quote. The market is fond of making mountains out of small hills and exaggerating ordinary vicissitudes into my major setbacks. So when there is some trouble the market doesn't like it. Wall Street says no thank you and the stock price goes down creating an opportunity on the net working capital. The net working capital comprises current assets minus total liabilities current assets cash inventories securities some ad receivables etc. So when you have a company that has let's say more cash current assets then all the liabilities then you get all the fixed assets for free just for free and that in the long term because those fixed assets are supposed to produce in the long term something then or be more valuable to the private owner because the private owner buys the assets then it might be a big investment opportunity. However in this market the net working capital stocks are very very rare finds and you have to be careful with the accounting and the management behind it and their intentions. One of the net nets is Amira Nature Foods that I discussed here but the management didn't meet my expectations. Let's say I'll make a video to give an update on Amira even if there is no news but you expect it so I'll make it sometimes. Graham also touches on small cap stocks that have out performed in the long term alongside value also check my video value versus growth where value outperforms but small caps he says are much more risky and he urges you to really know the company before investing in smaller caps due to their volatility he prefers the bigger names and let's say a little bit more defensive investor should stick to the bigger names. The third thing are special situations and workouts special situations are merger arbitrage situations where a company offers to buy out somebody else at price of 10 but the stock price is now eight so the market is discounting the risk that the merger won't go true. So if you specialize in such situations that's also a nice way to gain returns. For example Warren Buffett was of course long Monsanto because of the buyer acquisition and the workouts are things that have to work out. For example when a company is sued by another company then you never know what will be the outcome of such a lawsuit it could be positive it could be negative but Wall Street doesn't like such uncertainty and they discounted the whole even positive or negative outcome and when you can find that the stock is worth more than it's trading for even if there is a negative outcome to the lawsuit then it is again a special situation you can take advantage of it. However this requires a lot of work knowing what you're doing and specialization in such cases. So to conclude if you want to be an enterprising investor looking at growth stocks looking at bargain stocks special situations margins of safety intrinsic values you have to be fully dedicated to what you do and really invest a lot of time to understand and take advantage of the market. Graham believes that we can beat the market if we are real businessmen and we dedicate ourselves to investing. I am 100% dedicated to investing. I hope to help you by sharing what I do a little bit showing what I research what are my ideas sharing some stock picks. So I hope I can help you a little bit but if you don't have the time perhaps it's better to leave your investing to somebody else or to be a defensive investor where you have a location of stocks depending on the valuation and short term bonds now because long term bonds are very risky at these interest rates. So please subscribe as next time when we touch on this stock we will discuss Graham's chapter 8 which is the key component for all do it yourself investors. Thank you and I'll see you in the next video.


So before the mid-term exam, we finished on the topic or with the topic number theory and we introduced the concepts of the operations in modular arithmetic and you had some short questions about that in the mid-term exam. Let's just recap on some things because the next topic uses this modular arithmetic and some of the theorems that we have here. So just remind ourselves so that we can move on to the next topic. So we know what modular arithmetic is that we perform our operations mod n. We've seen some different properties, some of the new things which are a little bit interesting. Every number has an additive inverse, but not every number has a multiplicative inverse. The multiplicative inverse of some number is the number we multiply by to get one in mod n. The multiplicative inverse of A is B if A times B equals 1 or is equivalent to 1. And a number A has a multiplicative inverse in mod n if A is relatively prime with n. So that's important. Not all numbers have a multiplicative inverse. And what's relatively prime? Two numbers are relatively prime if their greatest common divisor is 1. I know some of you don't have the slides, so let's just write down some of these theorems and concepts that we've learned. You don't need to write them down. I'll just write them here so we can refer back to them. So remember about the multiplicative inverse. A number multiplied by its multiplicative inverse equals 1. And the multiplicative inverse exists if A and n are relatively prime, or I can't get a good colour. So I'll just make note of that so you can remember, where rp means relatively prime. If A and n are relatively prime, the multiplicative inverse of A and mod n exists. And we can find that value. There are algorithms to find the inverse quite well, quickly. What else did we see? We ended with some theorems, Fermat's theorem and Euler's theorem. I remember the totion, the totion of n, the count of numbers less than n and relatively prime with n. We'll write down just one theorem because we're going to use it later, the second form of Euler's theorem, this one here. And you saw that in the exam. If we have some number raised to the power of the totion of n plus 1, then in mod n, it's equivalent to that number, A. That's the second form of Euler's theorem. It doesn't hold for all values of A, but the values that we're going to deal with, if A is relatively prime to n, then it holds, and also some other cases it holds. And when we use it later, we'll see that it holds for the values we deal with. Those are things that we're going to need when we look at public key encryption. We didn't cover logarithms. So we covered the four operations of addition, subtraction, multiplication, division, and the other two operations are exponentiation and logarithms. We raise a number to its exponent, which is an extension of multiplication, and the last one is logarithms. Let's try and cover it now. So this will be new. So exponentiation in modular arithmetic is the same as our normal exponentiation. We just raise it to the power, the same as multiplying n times when we raise to a power of n. What's our normal logarithm? If B equals A to the power of i, then in normal arithmetic we say that the log in base A of B equals the index i. That's our definition of our normal logarithm. If A, the base equals 10, and the index equals 2, then B equals 100, that's exponentiation, and the logarithm in base 10 of 100 equals the index 2, so that's just the way we write our normal logarithm. In modular arithmetic we have the same concept. If B equals A to the power of some index i in mod p, so now we have a modulus, then we say the logarithm in base A, and instead of writing mod p here, we often for convenience we write the p as a subscript here, the logarithm in base A using mod p of B equals the index i. That's the way we write it. A logarithm in modular arithmetic is called a discrete logarithm. Discrete logarithm or abbreviated to delog. Delog means discrete logarithm, which is simply a logarithm using modular arithmetic. That's just the way, the notation we use. What is discrete log of 4 in base 2 mod 7? You would try and find the value, the index, you would try and find the value such that 2, let's get a better pen, the value 2 to the power of some index mod 7 equals 4. So the discrete log of 4 in base 2 mod 7 is this value i, whatever it is. That's just the notation and how we can use it. Does anyone know the answer? Can anyone find an i where that is true? 2 to the power of some integer mod 7 equals 4. You could try the different values of i, try i equal to 0, no i equal to 1, 2 to the power of 1 mod 7, no i equal to 2, does it work? What if the index is 2 in this case? If i is 2, then we get 2 to the power of 2 is 4 mod 7, 4 mod 7 equals 4, so this is true. So an answer of discrete log in base 2 mod 7 of 4 equals, we run out of space 2, because if i equals 2 that's true. Now are there any other values of i? What about i equal to 3? 2 to the power of 3, 8 mod 7 is a 4, no, what about i equal to 4? 2 to the power of 4 is 16, 16 mod 7 is 2, what about 5? 2 to the power of 5 is 32, 32 mod 7 is, so if i equal to 5 is also a valid number here. So if i equals 2 this holds, this is true, and if i equals 5 this is true. We do not have a unique answer of this discrete log in this case, because the discrete log of 4 in base 2 mod 7 can be 2 or 5 or possibly other numbers. What we'd like is a distinct value, just one value. So similar in our division, we can only divide when a number has a multiplicative inverse, and not all numbers have a multiplicative inverse, remember, a multiplicative inverse exists if we have a and n being relatively prime. Similar here, not all numbers can we find a unique discrete logarithm. And it turns out there are some conditions under which we can find a unique discrete logarithm, and we'll try and explain them. So first, before we go through the conditions, any questions about how to calculate the notation for a discrete logarithm? Just remember back to your normal logarithms, but now we have a modulus. So what we want, the discrete logarithm needs to produce a unique value. In this case it doesn't, because we see if i equals 2, our equation here holds, and if i equals 5, our equation holds. So our discrete logarithm would return different values. We need it to return a distinct value, a discrete value, and hence the discrete logarithm. So for what values can we find a discrete logarithm, a unique discrete logarithm? That's what we want to determine. We can only perform a discrete logarithm under some conditions, and the conditions are, we can find a value i if a, the base, is a primitive root of prime p. That is, the modulus p, if that's prime, a prime number, and the base a is a primitive root of that prime number, then it turns out we can find a unique value for a discrete log. If not, we get multiple answers, and we don't want that. The definition of our discrete log is we'll find a unique value, a unique exponent. So the next question is what's a primitive root? Our number a is a primitive root of p, or if it is, then if we take that number a and raise it to the power of 1, and mod by p we get some number, and take a squared, a to the power of 2, mod p and get another number, and a3, a to the power of 3, a to the power of 4, a to the power of p minus 1, then all this set of numbers are distinct. Give us different values, none of them repeat. Let's go through an example to show that. Let's find my example. Let's say we use a value of p equal to 7, so our modulus is 7. Why did that go blue? Our modulus is 7, a simple example. So for all this, p equals 7. Let's consider different values of a. From a equal to, we consider from 0 up to 6, less than 7, but 0 we'll see is not very useful. So from 1 to 6. And our definition, we need a to be a primitive root of p. P is 7 in our case, we need to find a value of a, such that if we take a and raise it to the power of 1, to the power of 2, to the power of 3, up to the power of 6, then those answers are distinct values. So let's try for different values of a. So what we want to find is the answers of a squared, a cubed and so on. We'll quickly calculate some of them. Try. Try and find for a equal to 1, a squared, everything's mod p, that is mod 7. Find the answers for a equal to 1 of those other five values. You try and calculate the answers first. You can calculate for all of them. They're quite simple. What's the first answer? Here, a equal to 1, a squared mod 7 is 1, a cubed mod 7, when a equals 1, the first set are easy. So when a equals 1, a to the power of 6 is of course 1, mod 7 is 1. And now do it for a equal to 2, a squared, 2 squared is 4, mod 7 gives us 4, 2 cubed mod 7, 1, 2 to the power of 4, mod 7, 2, 2 to the power of 5, mod 7 and 1. And now do it for a equal to 3, 3 squared mod 7, this is easy, 3 cubed mod 7, 27 mod 7, 6, 81 mod 7. All right, maybe you take a bit more time, it's 4, 283 mod 7, I need my calculator but I've calculated before, it turns out to be 5, okay. And the last one is 1 as well. And I'll give you the answers for the remaining ones, we've got 2, 1, 4, 2, 1, 5 squared is 25, mod 7 is 4, 6, 2 and 6, we get 1, 6, 1, 6, 1. So which values of a are primitive roots of 7, 3 and 5? Because the answers here of a to the power of 1, a squared, a cubed and so on give us distinct values, 3, 2, 6, 4, 5, 1 and for 5, 5, 4, 6, 2, 3, 1, we get no repetitions in there. What that means is when we do a discrete logarithm where the base a equals 3 and p equals 7, for any value here we'll get one answer, a distinct value here. And similar if the base a equals 5, mod 7, for any value here we'll get one distinct answer. Whereas with a equal to 2, there are multiple answers, okay. So the primitive root is defined as giving distinct values for a1 up to a to the power of p minus 1. So we only deal with discrete logarithms when we get a unique exponent, that's what we're interested in. What's the answer? Discrete log base 2, mod 7 of 4, so we've got the answers here. When a is 2, when the answer is 4, sorry what have I done? I've given you the wrong one, a equal to 3, 2 doesn't work, that is we've already done 2, 2 gives us multiple values. When a equals 3, where 3 is a primitive root of 7, 4 in this case, discrete log, discrete log of 5, discrete log of 5, why am I choosing easy ones, 6. So when we have the base of 3 and we raise 3 to some power, we get an answer of 6. When we have the base of 3 and we raise it to the power of 3, the answer is 6. So the answer here is 3, 3 to the power of 3, mod 7 equals 6. So we can find discrete or unique answers in this case, my pen's gone wild. So now we, similar with multiplication, not all numbers have a multiplicative inverse, not all discrete logarithms have a unique exponent. So we only deal with certain sets and in this case if we have a primitive root, if a is a primitive root of p then we can get a unique exponent i with a discrete logarithm. That will become important in one of our later, in fact in public key cryptography in several algorithms. Solving a discrete logarithm is an important challenge and we need to select numbers such that we can get a unique answer. There's some integers which have primitive roots and 2, 4, when p is an odd prime, p to the power of alpha, where alpha is an integer and 2 times p to the power of alpha, turns out they have primitive roots. This is another example. So the example we went through was the mod of 7, here's an example with mod 19, where we look at a to the power of 1 up to a to the power of 18 for all the different values of a and we see what are the primitive roots, what are the primitive roots in mod 19? First primitive root and this slide gives the hint in that it's coloured as a grey box. If you look inside, well for a equal to 1 we get all the same value, with a equal to 2 if you look at these 18 values they are unique, there's no repetitions. So a equal to 2 is a primitive root of 19 and similar with a equal to 3 is a primitive root of 19. 10 is 13, 14 and 15 are primitive roots of 19. What's the discrete log of 3? Where the base 13 and modulus 19, base 17, 3 to the power, sorry, 13 to the power of 17, mod 19 equals 3. 13 to the power of 17, mod 19 equals 3. So that's the answer here is 17. Finding the discrete log of large numbers is hard. Even if we know there's a unique discrete log, if we know a number is a primitive root of n then still finding the value is computationally difficult. Let's just record our notation here. So the different primitive roots of 19, 2, 3, 10, 13, 14 and 15. So that finishes our topic on number theory. We're going to see that being used in the next topics. And we're going to see that even though we've gone through simple examples, some of the calculations of solving the problems we've seen in modular arithmetic and number theory are computationally difficult. That is, if we use very large numbers, there are no known ways to find an answer in a reasonable amount of time. Three problems which are important. First is integer factorization. That is, integer can be factored into its primes. If n is calculated as p times q where p and q are prime numbers, so the factors of n are p and q, the prime factors, then if p and q are large then there's no easy way to find p and q given n. So if someone gives you n and you know it was calculated by multiplying two large prime numbers, you don't know those prime numbers, your challenge is to find p and q if they're large enough then it will take you forever to find it. So large enough, some examples we'll see, we'll talk about RSA later, but primes n is, for example, 768 bits or about 232 decimal digits. So if you have a number, you write down 232 decimal digits and n, that's the value of n, or the approximate length of n, where that was determined by multiplying two primes p and q together, then given that n, find p and q, the best, well, over the past few years people could solve that if there was 232 digits, if there was 300 digits then there's no way you can solve that in a reasonable amount of time. It takes too long to find the answer. So if n is large, finding p and q is considered practically impossible. Similar of our brute force attacks, if we have enough bits in our key, finding the right key is practically impossible because it takes too long. Another problem is calculating Euler's Totion. We saw it as quite simple. What we do is we count the numbers less than n, which are relatively prime with n. You had one in the midterm exam, the Totion of 24, easy, you found it was 8. So if n is a composite number, it's not prime, if it's prime it's easy to calculate. The answer is p minus 1. If n is prime, the Totion of n is n minus 1, that's easy to calculate. But if n is not prime, finding the Totion is computationally difficult to calculate. Again, for large values of n, it's considered practically impossible to calculate. It takes too long to find the answer and it's considered a harder problem than integer factorization. Given some n, either find the two prime p or q or find the Totion of n, both of them are going to take too long if n is large enough and it's considered that the fastest one would be the factorization. Finding the Totion is even slower than factorization. The other thing is that solving our discrete logarithms is hard. If we know, if we have, if we a, p and b find the index i and again with large values, that's considered too hard to solve. There are no known ways that can solve them in reasonable time. And it's comparable in difficulty to factorization. We're going to use this, or different security algorithms use these concepts in providing the strength in their security. They use these different algorithms, factorization, the Totion to make it hard for an attacker to try and break the security. So we're going to see that coming to play. The next topic is public key cryptography and that's where we see these used. Any questions on any of the things, the discrete logarithm especially that we've covered quickly this afternoon. Just try and understand that not all values we can calculate a unique discrete logarithm for only when a is a primitive root of p, the modulus. And we'll see where these problems come into play in the next. What's gone wrong? Let's talk about public key cryptography. First we'll talk about the general principles and then we'll go into one example algorithm, RSA, and we'll see those problems or those challenges of factorization and so on being applied. Everything up until now that we've covered is considered symmetric key cryptography. And all the ciphers, Caesar cipher, those classical ciphers, DES, AES are all symmetric key ciphers. And it wasn't until the 1960s that people come up with new approaches, an alternative. And the approach is called asymmetric key cryptography, symmetric versus asymmetric or also known as public key cryptography. In the 1960s the security organization in the US, the NSA, found or developed a different way to encrypt information, the concept of public key cryptography. And the first known report that reported on such technique was come from a similar organization in the UK. And the first public report was by two guys called Diffie and Hellman. And in 1976 they introduced the concept publicly of public key cryptography. It wasn't until more recently that these earlier reports from the UK and NSA came out. They were kept secret. The idea of Diffie and Hellman was to develop a technique that didn't rely on other parties to help distributing the keys. The main problem with symmetric key cryptography is that source and destination must have the same shared key. For me to get the key to someone else, it's very inconvenient. One way to make it more convenient and automatic is to use some trusted third party who distributes keys. For example, two students want to communicate using symmetric key cryptography. One of them selects a key. One approach is that they need to somehow distribute that key to the other student. That's the challenge with symmetric key cryptography. They need to get that key secretly to the other student without everyone else finding out. That's difficult, especially when we want to automate it approach, like across a network. So one approach would be to have one person act as a trusted third party. For example, me. One approach with symmetric key cryptography is that when one student wants to communicate with some other student, they come to me and I give both the students a shared secret key. So one comes to me, I give them a shared secret key, and then later the other student comes to me and I give them the same key. And then that pair of students can communicate using that one key. So a common way to distribute keys is to use a trusted third party to help distribute the keys. It makes it more practical. But in a number of cases, we don't want to have to trust other entities. You may not trust me to do that for you. So Diffian Helman wanted to develop a technique that didn't rely on such techniques. And they wanted also to allow digital signatures. The digital equivalent of signing something to show that it came from you. So that later we can prove that it came from you. And we'll see that concept in more detail later. So they develop public key cryptography. What is it? Well, before we get what is it, let's compare it with symmetric key cryptography. Note, I'll use different terminology here. So symmetric key cryptography or symmetric algorithms, sometimes called secret key cryptography, we have a secret key at both the source and destination, the same secret key. There's just one key. Symmetric, it's the same at both sides. Asymmetric algorithms, or also public key algorithms, we have two keys, two different keys. So we have a pair of keys. One is a public key and one is a private key. By public, we mean anyone can know that key. It doesn't have to be kept secret. In fact, the important way, or the practical way to use it, is that it's made public, it's not kept secret. But the other key in the pair, a private key, is kept secret. So it's also a secret key. But there are two keys in this case, as opposed to symmetric key algorithms, which use just a single secret key. And in asymmetric algorithms, we encrypt our data using one of the keys in a pair. And the algorithm must be such that the ciphertext can be decrypted using the other key in the pair. So imagine every user has a pair of keys now. I have a public key and a private key. If I want to send some data, I encrypt with some public key and it's decrypted with the corresponding private key. And in some cases it can be the other way around. Encrypt with a private key, decrypt with a public key. You encrypt with one, decrypt with the other. Yes, the public key we assume can be seen by everyone. So let's say I have my own pair of keys, a public and a private key. I can write the public key on the board. I can send it in an email. Everyone can see the public key. By definition, it's open. It's not secret. The private key is secret. It must be kept secret for all of these algorithms to work. What we will need for asymmetric algorithms, where we use two keys, a public and a private key, is that it's hard, computationally infeasible, to determine one key given the algorithm and the other key. So if a malicious user knows the algorithm, we assume in all of our ciphers that the algorithm is known. Desk is known, RSA is known, all the algorithms are known in advance. So if a malicious user knows the algorithm and it knows the public key, it should be hard to work out what the corresponding private key is. Because the private key must be kept private, secret. If they can find it out, it's no longer secret. In some cases, in some algorithms, we have an optional feature such that we can use the keys in opposite directions. One approach is I encrypt with my public key and the ciphertext can be decryptive with the private key. The alternative is I encrypt some message with a private key and the ciphertext can be decryptive with the public key. So you use them in opposite order. In some of the algorithms we'll go through, this feature is present. In others, it's not. It's not necessary in all cases. So let's give some notation and definitions for these keys. So now we have the two keys. A public key is available to everyone and the private key must be secret, secret, known only by the owner. So in fact now, a user has a pair of keys. So I will have my own private key and public key pair. My private key only I know. My public key I can tell everyone else. All of you may have your own public-private key pair. And you can tell everyone your own public key but you'll keep your private key secret. How do we use them? For secrecy, which means if we want to provide confidentiality of our data, that is I want to send a secret message to someone, then what I do is I encrypt that message using a public key and the ciphertext is just decrypted using the corresponding private key. Okay? So for confidentiality or secrecy, so keeping the contents of the message private or secret, encrypt with the public key, decrypt with the private key. So that's providing the equivalent service as the symmetric key algorithms. With DES, what we do is we encrypt our plain text with a shared secret key, send the ciphertext and we decrypt with the same shared secret key. Now with a public key algorithm what we do is we take our plain text, I encrypt it with a public key, send the ciphertext and the receiver will decrypt with the corresponding private key. Okay? If we have an appropriate algorithm and chosen the keys correctly, we can see that we will see that that provides secrecy or confidentiality. It turns out we can also use most of these algorithms for authentication. What's that? That's about proving that the message came from the right person, the person who they say they are. So secrecy is confidentiality, making sure that no one else can see the message. Authentication is we don't care about whether someone sees the message, we care about when I receive a message that it came from the person who they say they are. And we can do that by using the keys in the opposite order. So what I do is I take a message, I encrypt it with a private key, it will turn out to be my private key, send it to you, you decrypt with my public key to confirm that it came from me. So the goal here is the receiver must be able to confirm that that message came from me. It didn't come from someone pretending to be me. That's what authentication is about. Making sure that the message came from the right person. We'll see that that's a key part of or an important part of how public key cryptography is used for authentication. So importantly every user now will assume has a pair of keys, a public and private key. And we'll often denote that as PU for public and PR for private. So the user A has their own public key, PU A, and also a corresponding private key, PRA. And depending upon, well, there's a relationship between these keys. Okay, they're not just random keys. We'll see that the algorithms help us or determine how to choose these keys. They're no longer just random values, they relate it. Depending upon the algorithm, we'll see the different relationships. Here's an example. Here we have our user Bob. This is Bob on this side. And there are other users in the network. There's Alice, there's Joy, Mike and Ted. Assume everyone has their own pair of keys. Bob has his own public and private key. Alice has her own public and private key. So do the other users. And in this case, Bob wants to send a confidential message to Alice. So a secret message. Bob must know the public key of the other users, especially Alice in this case. And that's not difficult. Because they are public, it's easy for Bob to find out the public key of Joy, Mike, Alice and Ted, that public keys of other users. For example, what they can do, every user puts their public key on a website. This is the public key of Alice. This is the public key of Joy and so on. This is the public key of Bob. Because everyone's allowed to see them. And now when Bob wants to send a message to Alice and doesn't want anyone else to read it, Bob encrypts the plain text using Alice's public key and gets some ciphertext and sends the ciphertext to Alice. And then Alice decrypts that ciphertext using her private key and should get the corresponding plain text. If the algorithms are designed correctly and the keys are chosen correctly, that will work. We need to go through the details of those algorithms. But if we've got an appropriate algorithm, if we encrypt with the public key, we can decrypt with the corresponding private key. And why do we get confidentiality in this case? Well, this will work or this will provide confidentiality if only Alice's private key can decrypt the ciphertext. Take our plain text encrypt with the public key of Alice. Assuming the algorithm is such that only the corresponding key can successfully decrypt, any other key will not. Any other key will produce an error. If only it can be decrypted with Alice's private key, then that means that this is confidential because there's only one person in the world that can decrypt and that is Alice. Because by definition, only Alice has her private key. So this is a basic concept of confidentiality with public key encryption. The sending user encrypts with the receiver's user's public key. The receiver decrypts using their private key under the assumption that we have an algorithm that if we encrypt with one key, we can only successfully decrypt with the other corresponding key. So you want to send me a secret message. What do you do with public key cryptography? Which one? Which public key? My public key. If someone wants to send me a message, a secret message, you encrypt using my public key. And only I can decrypt it because only I have my private key. That's the idea there. So encrypt with the recipient's public key. Of course, we need to look at what algorithms can be used here and there are different algorithms that can be used here and the algorithms define how the keys are related as well. That's for confidentiality or encrypting data. In fact, we can also use it, my mouse is dying. We can also use the keys sometimes in the opposite direction. Here's a case where we don't want confidentiality but we want authentication. Here Bob wants to send, Bob's going to send a message to Alice. Bob doesn't care if someone else sees the message. The important thing here is that Alice can confirm that this message came from Bob. It didn't come from someone else pretending to be Bob. So this is authentication. What happens is that Bob uses his own private key to encrypt the message, sends the ciphertext to Alice and Alice uses Bob's public key to decrypt. So we're always using this assumption. If we encrypt with one key, we can only decrypt with the other key of the pair. Can someone else see the message? How do they see the message? Okay. If I intercept this message, the ciphertext here, note it's encrypted using the private key of Bob. I just find the public key of Bob which is public and decrypted. So I can see the contents of the message. So this does not provide confidentiality. It's not intended to. Now, can I pretend to be Bob and send a message to Alice? What do I do? I want to pretend to be Bob, perform a masquerade attack and send a message to Alice so Alice thinks it came from Bob. I would need the private key of Bob. By definition, I don't have that because that's secret. It's private just to Bob because what Alice is going to do when Alice receives a message and it says this message is from Bob, she would decrypt that using Bob's public key. If I send the message and it was encrypted with Steve's private key, Alice thinks it came from Bob therefore will try Bob's public key and it will not successfully decrypt. And that's where Alice will determine us. Something's gone wrong. It should successfully decrypt if it came from Bob. So this is a way for providing authentication. For the receiver to check where the message came from. And that's an important service. And the difference between the two is that we just use the keys in the opposite order. Here we use private key, public key. In the previous, we use public key, private key. Let's compare. What do we got here? Something looks wrong. You're right. The public key, so for secrecy is this case, confidentiality. The public key is used in encryption here. And for secrecy, the private key is used in decryption. But the second one, that should be the opposite way or wrong. Here the public key is used in decryption. And the private key is used for encryption here. So thanks, you've picked up a mistake here. This for private key for authentication, which was the second diagram is used in encryption. So for authentication, we encrypt with the private key, decrypt with the public key. Yes, but we're using the public key to do that. So for secrecy, public key, and then private key, that's this case, public key, private key. Authentication is this second case, private key, then public key to decrypt. What have we got left? What's the difference between asymmetric and symmetric cryptography? Here. Okay, it's getting confusing because here's another name. Symmetric key cryptography, also called conventional encryption. That was the original form. Symmetric key cryptography, secret key cryptography, conventional cryptography or encryption are all the same. Public key cryptography or asymmetric key cryptography are the same. Let's compare the two, the symmetric versus public key. In conventional symmetric key cryptography, we have the same algorithm, and we have the same key. We have one key used. And the send and receive must share that algorithm and key. Importantly, the key must be known by the send and receiver. In public key cryptography, we have a pair of keys. One is used for encryption and one is used for decryption. So now we have two keys. And the send and receiver must have one of the keys in the pair. So the sender may have the public key and the receiver uses the private key or the other way around. The sender uses the private key and the receiver uses the public key. In symmetric or conventional encryption, to provide security, we need to keep the key secret. That's important. And some of the things we've seen, it must be impractical to find the message if there's no other information known. That is, given the ciphertext, it must be hard to find the plaintext. And given knowledge of the algorithm and even some past samples of ciphertext, as from previous ciphertext, it should be hard to find the key. There are normal requirements for symmetric key cryptography. Now, with public key cryptography, we have the requirement that one of the keys must be secret, the private key. Given some ciphertext, it must be still hard to find the plaintext. That's the same requirement. And it should be hard to find the other key. If you know one key, it should be hard for malicious users to find the other key. That is, if you know my public key, you shouldn't be able to calculate what my private key is, because there, then it would no longer be private and our security or our system would not work. But with all the algorithms, there is a relationship between public and private key. It just must be hard for the malicious user to find one given the other. So we'll see how that works for one or two algorithms. Let's go to an example. And then we'll come back to these slides after the break. Let's go direct to an example algorithm and then we'll return. One of the most well known algorithms for public key cryptography is the RSA algorithm. We'll talk a bit more about the history later after the break, developed by Revest, Shamir and Adelman, same guy who made RC4, Ron Revest and a number of other algorithms, and of course, named them, R, S and A. Let's just look at the encryption algorithm, go through a quick example and then later we'll come back and explain how it works and why it works important. Here it is, here's RSA. Just focus on this equation. C equals M to the power of E mod N. In the symmetric key cryptography and desks, at least with simplified desks, we went through all those steps of initial permutations, S boxes and so on. With RC4, we went through these steps of permutating and rearranging our vector. With RSA, we have a simple equation, C equals M to the power of E mod N. That's encryption, where M is our plain text, C is the ciphertext, and E and N are parts of one of our keys. Here's where our modular arithmetic is going to come in. We'll see later things like multiplicative inverses, discrete logarithms, because you can see we're raising something with the power, gives a hint that discrete logarithms are going to come into play. E and N are the public key. The public key, in fact, is two values, they are integers. The length we'll talk about later, but two integers. So the public key of some user, E, P, U, of B is E and N. What we do to encrypt a message, we take that message, which we represent as an integer as well. So if the message is, let's say it's a long string, then we need to represent that as an integer. Let's say we convert it to binary and take a thousand bits and that's a one thousand bit number, a one thousand bit integer. So we have an integer. We raise it to the power of E in our public key, mod by N, and we get our ciphertext. Let's give an example. Actually, there's an example on the screen. We'll use that for, here's the example. We have, in this case, the public key E is seven and N is one hundred and eighty seven and we have a message, which is the number 88. That's not a good message, but the idea is that if we have some string, for example, we can represent it in binary, then that can be represented as some integer. In this simple example, the integer is 88. That's the message M that we want to send to the other side. So what we do is we take 88, we raise it to the power of seven and mod by 187 and if you use your calculator, you get 11 in this case. So the ciphertext is 11. We send 11 to the other side and the other side decrypts and the decryption algorithm, which was on one of the previous slides, is effectively the same. To get the original plaintext back, we take the ciphertext, raise it to some number, in this case a different number, D and mod by the same modulus N, where the private key is often written as D and N. That's at the bottom, that's here. The private key is D and N. The public key is E and N. Encryption, C equals M to the power of E mod N. Decryption, M equals C to the power of D mod N. Same N and you can check at least for these values and see that it works. When I say it works, it means if we encrypt M and get ciphertext and then we decrypt, we must get the same M back otherwise it's unsuccessful. We take 11, raise to the power, in this case D is 23. So that was chosen. The private key was 23 and N, the same value 187. 11 to the power of 23, mod 187 and you can check with your calculator and the answer is 88. It gives the same plaintext as what we had at the start. That's how RSA works. Under what conditions does it work is important. Let's try another example. A simpler one that maybe we can do before our break. Let's say we have a public key E equal to 4, N equal to 20 and there will also be a private key D equal to 2, N is also 20. So in fact N, although we say N is part of the private key, that is in fact public because it's the same N in the private and public keys. So N is known. The only thing secret is D in this case. And let's say I want to encrypt some message M equal to 15 encrypt and so I'll help you with a calculator. What's the step? Let's say I want to send, I have, you have this public private key pair. I want to send you a confidential message. So I encrypt using your public key, this value, and you will decrypt using the private key. So what I do is using our algorithm C equals M to the power of E mod N. M is 15. E is 4. N is 20. Anyone know the answer? Calculator. Let's try it. What have we got? 15 to the power of 4, mod 20, 5. Okay? Simple. That's our cipher text. Did you get that? Same value? Should end with 5, correct? You look at the other number. Go back. Do it again. What's 15 to the power of 4? 50625 mod 20, I think if you divide by 20 the remainder is going to be 5 in that case. 5 is a cipher text. I send 5 to you. What do you do? How do you decrypt? You take the cipher text 5, raise it to the power of D2 and mod by the same N. What's the answer? Good. What's wrong? Didn't work. Here I took the cipher text so you receive the cipher text, you apply this algorithm, 5 to the power of 2, mod 20, and you get 5. But my original plain text was 15 and you've got a plain text of 5. That's of course not a good cipher because we need to get the same plain text out at the receiver. It didn't work here. So importantly the RSA algorithm only works under certain conditions that is only works for some values of E, N and D. It doesn't work for any possible value. That's why we need some way to generate the values of E, N and D such that this will work. In the first example, with example on the screen, it worked. Why did it work? Because E, N and D were chosen in such a way that it would work. In this example they were not chosen correctly. The keys were not generated correctly and hence when we decrypted we didn't get the original plain text. So what we need to do is go through how to select the values of E, N and D such that it will decrypt successfully and that's what we'll do after the break. So what we'll do after the break is we'll go through in detail of when does RSA work. So let's stop there and start at 20 to 3.