Sunday, March 28, 2021

Save democracy with "Participative democracy"

    Many models have been designed to ensure that the elected representatives of the people in democracy represent the complete mix of the people they represent. Yes, that sentence was a mouthful. But, so is the word democracy just, by itself. Of late I have been intrigue by how the residents of huge apartments are running their own country. The apartment is a perfect example of a democratic crowd. The crowd can be extended to include secular based on its geographic location. It has all the problems of a small country. In a country like India, few of the apartment can house approx 150 families. That is a definitely a small district in few other countries. These apartments are managed by a participative democratic system which existed in ancient Greece. Which was the point of contention between Socrates and the state of Greece. This case of Socrates v/s the state of Greece is one of the most interesting court cases. Oh, I am getting carried away. This is the result of not planning your writing. However, let us continue with apartments.

    A lottery system is utilized to select representatives to head activities related to the upkeep and maintaining the day to day activities of the apartment. Nobody can escape from this participative democratic system of governing the apartment. For once, everybody is equal. For once all the citizens are to participate and help the elected representative in carrying out its duties. So, though, you are not the elected leader for a specific task, if you are supposed to help, then you have to. You are participating as a leader as well as a supporter. You are always "in" the daily polity of the apartment. You are participating in one way or the other. For once, it is everybodys damn responsibility to ensure the smooth functioning of the apartment. I am not going to go through the nitty/gritty of running an apartment. It is no less than running a small country.

    What I am suggesting is the implementation of this methodology in grass root governing in a democratic system. In a democratic system, the non participants are huge. Nearly 99.99% of the population. This makes this major population, alien to the working of the governing mechanism. This makes the governing mechanism take total undue advantage of the major population. This is the other sharp edge of the democratic system. This makes the majority population not participate in the day to day running of the country. So we have three classes in this majority. One which likes the present governors, one which hates it, one which doesnt care. There is another group which is part of the corruption or tries to take advantage of this system, though they know that what they do is hurting the majority of the population. These are pretty complicated. These mostly end up in the governing seat. So, the vicious circle repeats.

    It is time to repair democracy, instead of looking at other models. There are no other forms of governance which have the word freedom mentioned as  much as in a democratic system. The majority rule is a recent development. In the ancient greek times when, democracy was at its peak, "participative"  was the buzzword and citizens not participating were labelled "useless". Everybody has to know how to govern. Everybody knows how to govern. Everybody governs themselves. The apartments are running this model, even without knowing they are doing so. The term of the representatives is the same, approx, an year. However, there is one problem. Poor people were not involved, However, now we can include everybody. The grass level can be divided into smaller divisions particularly based on the population. This ensures that the representatives are not overwhelmed. This will be the case for the first few. Once everybody understands the concept, it will become common place. The representatives must have lived in that environment for a certain number of years, so that they represent the population better and understand the job at hand.

    There will always be people who are waiting for their turn. Everybody believes they will better the previous fellow. The present fellow does things, which he believes nobody can better. The representative has to be careful in all his decisions, since he will land up as a commoner after his term is over.

    This should work. I am excited. Whenever we had discussions regarding alternate forms of democracy among friends, the discussions shifted to other forms, except democracy. People go back in time to compare the good old times. When it comes to governing, I dont know why the present crop forgot the fantastic "participative" democracy from ancient Greece. So, you are asking me to develop it further. I will tell you, this is not a theoretical concept that is being put forth. This is a time tested and an in execution methodology. It has just to be implemented. So, what are we waiting for?

    The most important of all in any governance system is the ownership of the responsibilities. This has been so rare in the present majority system, wherein the elected candidate does not consider the vast minority whom he believes have not voted for him. But, in this case, the ownership comes from within, without anybody coercing. Though somebody is not in that chair, all the others who are not in that chair know that one day or the other they will land up in that chair. They will be compassionate with the present representative, which they hope to receive when they sit in that chair. This synergy between the leader and the team being led is so strong and fantastic, you have to be a part of that system to understand it. In the present majority setup, there is a certain dis-connect between the elected individual and the electors, which happens once in 5 years. With the present advancement in technology, 5 years is a very long time. Leadership change should happen every year, at the least. This keeps the leadership above the grassroots on their toes. 

    Every change in the grassroots brings with it, an aura of the elected individual, who has been seeing all things happening around him. Since he is a part of the receipience of the older system, he knows what things were done right and what were done wrong. He will first attack and try to resolve what he believes are being done wrong. It is like, the system is in sync with the rapid changes happening in the technological, political and the economical setup. With the present connectivity, the grassroots are connected, in, real time. It is very easy to borrow the "best practices" in one area and try to implement it in full or modify it to meet the particular place.  and a sense of commitment. 

  One more important aspect is the information on the candidate. In these closed circles, the particular individual will be know because of his past deeds. Or a new person can go about familiarizing the electorate since the size of the group is not as large as it is today. This makes the electorate more knowledgeable about the candidate. They will remember his every move. The duration is short and the electorate can correct their mistake at the earliest. Consider the situation now. Majority of the voters dont know the candidate. They vote for the political party. Now, once the candidate wins, he might land up in the opposite party. Now, the majority voted for the party to which the individual belonged. Now, the candidate has defected. He will now have to act according to the whims of the new party. Now, the voters have to wait for the next election to correct their mistake. By that time, people would have forgotten the past and would associate the candidate with the latest party he has joined. This is horse shit.

    The concept of making a quick buck and running away dont work because his family is a part of the system and all wrong decisions are going to affect him all the same. The election system should borrow from Estonia, since the electoral territory is now very small. This is perfect for both villages and cities. In this inter-connected world, it is difficult for anybody to be aloof. In fact, the aim of the system is not leave anybody aloof. It is to try and make everybody responsible for themselves and their surrounding environment. This is unlike a system, wherein decisions are taken in huge buildings and taken by the majority wins, not one with the representatives who really represent the grassroots. 

    Enough of everybody talking politics and staying away from it, thinking that it is a dirty job and has to be done by dirty people. It is like, everybody is thinking that the other fellow will do it. This is to bring everybody on the execution roll. Everybody is responsible. If something is wrong, a person who stays quite should face as much problem as he is vociferous about it. Yes, we cant wait for "the" person who knows how to do the "job". There is nobody who is "the" person to do the job. And Yes, Socrates, you are wrong.
 

The revolution, can start.

Sunday, March 21, 2021

The Hateful Eight :- "The" movie experience

     Film making is an art. Watching more so. But, watching as an art is the result of watching what is on offer. Is watching an art? How so? Well, It is the immersion of one's conscience for a certain amount of time in the film maker's conscience. Film makers cannot put constraints on the audience to come with a certain frame of mind. The film should mold the watchers mind from inception of the movie and kick start that exact frame of mind. Many film makers do this by adapting a style of film making. So, when an audience who knows the style of making, there is already a certain frame of mind ready for the make to start with. It is like the make has created a small world which the audience is already familiar with. This makes the job of the maker much simpler. This allows the maker to take certain things as known. This allows the audience who knows a little about the universe to jump right in. So, should a maker continue to weaver stories in that universe? Maybe, until the universe is the same, the pacing, the style stays, the maker can still make plenty of stories in that universe or a time frame in that universe. He can expand the universe and travel in time in that universe as per the story he wants to tell.

    Well, what do I know about film making, nothing. Watching, yes, a little bit. Let me be clear as to my kind of films. Let me start with what kind I am not. I dont like the Tree of life. I liked the Thin Red line. There you have it. Now, you know where we are headed. Would I have liked the maker of the Thin red line to continue in the same line. No, what if he had made the thin red line and then stayed in that universe. I might have loved it. But, what if the maker only that much. He didnt want to prod that universe further. No mistake of his. But, I did not like the Tree of life, which wanted to encompass "everything", which is impossible. There is not theory of everything, not yet. Now, what I am telling is I did not like the Tree of life. I did not tell that it is bad. Let us not get into good and bad.

    I like film makers who dont make this distinction between good and bad. The film maker should tell a story. The characters can make their own reasons for all their actions. But, the film maker should stay clear of offering judgement regarding good and bad. This makes for an independent view for the viewer. Re-Watching The Hateful eight after watching it when it was released, is the reason this post is created. The characters, the music score, the premise, the execution transformed me to wyoming, again. This is a grand success for a film maker. Transforming the viewer, again, to the same place is a major win. I take a bow to the maker, Quentin Tarantino. Here is a maker who has been consistent in his style, but still making stories in varied setups. 

    But did I like Once upon a time in Hollywood, No, Please. I want to forget that I did watch this movie. It is not in the Tarantino universe, which he has built painstakingly and has been digested by the viewers, effortlessly. So should the viewers complain when shown a complex plot. Should we put on our Science and Mathematics cap before we watch a movie. Hell, No. That will not be a movie, but a glorified documentary. It is better to watch a documentary which explains the concepts well, than an attempt by the filmmaker to take a part of the concept and pour plenty of fiction to cook the movie up. How about shooting a movie linearly and then editing the film non-linearly. It can be entertaining with the awe factor. But, still the non-linearity should be simple enough so that you still have the audience with you.

    The Hateful eight has all the ingredients to be played out as a play, live, in a theater. I would love to watch one, if anybody tried it. Maybe Quentin might try it after he finishes the films which he wants to make. The lines are well written. The non-linearity comes in the dialogues. Very interesting. The viewer is frequently taken back in time on occassions and also made to extrapolate in time just by the characters talking. All the characters talk their linog, their thoughts, their limitations. No character is God like. No character is an all-know. Every characters stays that very character. This give the viewer a consistent interface. This does not cheat the viewer. The heightening of tension, the hallmark of Quentin's writings is intact. 

    The drama is heightened by the music score. There are very rare occasions, wherein the music score elevates the movie experience. Satya, a Hindi movie, comes to the mind. The camera work is not jarring. The film is laid back in its execution, but makes the audience blood to race, an unusual combination. The pace of the movie and the blood rate surge have been equal, on very rare times, like watching the Matrix. The artists are at home. Their attire, their accent, is consistent. Every character has the mix of survival and ego, going together, while situationally, only one of them comes on top. It is a text book movie for film-making. It is a text book movie, for movie watchers. With movie makers creating huge structures for making one, this movie gives a complex to all those elaborate setups.

    The Hateful eight is one more example of the cohesiveness which can be achieved when the story creator and the executor are the same. There is that tight grip on characters and what they speak, how they re-act. All these things cannot be written by the writer and fully transferred to the director. Such well written characters can only be justified if the director also is the same person. The hateful eight is a movie, which made me think, "what a time to be alive".

    Once upon a time in Hollywood is the movie made by the same director, but, which has been passed on to this dimension of the universe from a parallel one, which does not have the tag line "what a time to be alive"

Friday, February 26, 2021

Why are people obsessed or made to obsess about culture

Of all the chains around the present humans, no chain is stronger than the chain of culture. Culture has grown to such a level that it "is" the way of life. It is the "benchmark" with which you compare all your actions and thoughts. Benchmarking your actions is ... but benchmarking your thoughts which in turn would result in your actions is the dangerous thing. The narrowing of ones thoughts by culture is stifling. 

     The freedom from the chains of culture can be best expressed by a person who lives his country and settles in another country. The initial freedom experienced by the individual, cannot be expressed. He love it, he relishes it, he compares it. he sees that the culture in that country is so different. He is forced to compare it. If the foreign culture even give a little leeway to the existing tight cultural chains around the individual, the individual feels euphoria. What if there is a place with pure anarchy and the individual lands up in this planet. What would be the result on the individual is an interesting case study, and we have to wait until we accidentally step into such a planet. So until then ......... 

     Why should an individual and the society behave in set ways for any action from any constituent of the society? Why should all the actions and activities be so strictly established. Why does culture change across groups of people in one single society? Why is there no common culture among all the humans? Why do individuals who go from an older culture be "relieved" when he lands in a country with a recent culture or a country in which the culture has not been made "dogmatic"? The feeling when an individual transforms to a culture on the other way round, all that relief will reverse to stifling. We have seen the evolution of right and wrong over the years. We have seen human sacrifice justified and the entire society feeling that is right. We have seen that slavery was also justified and in certain cultures it was found to be right. Right and wrong have also evolved, but there is no right and wrong freely available for an individual. Should the individual not have his own morals, his ethics, his behaviors?

    Cultures are giving birth to robots. But the thing is there are certain individuals who have a feel that this is happening but somehow have a different explanation for following the culture. This group of individuals are more dangerous. Because these people have reasons for why the culture is so, and that reason is never upgraded. But continues to get more "dogmatic". If there are people who want to question, they will be termed impure and alienated. Once this is done the idea and the questions which arose in that individual dies with him. So, we have to wait several generations for another individual to come up with the same sets of questions and may be solutions. 

    The change in culture over the years have been brought about by bright individuals who had the grit and the knowledge of changing the perception of the entire race, while many more tried their best to hold on to the classic culture. However, the present days with un-paralleled information flow we have barriers which have not been seen over the entire human past, that is the number who want status quo has increased and have become vociferous because people can now read and write. This reading and writing ability has been turned on its heads by powerful people and have started to use this ability in controlling people. 

    Culture is the bottom line of all the changes over the history of a particular group. However, the changes, ideas have been weighted with the more weighty ones overruling the lessor weighed ideas, though they may be better. The same strategy is being used now. The more weighted idea is weighed by the reach it has. The more the reach the more the weight. So, do i suggest that all individuals with similar ideals be grouped together. I would say yes here, but we are talking about the most intelligent animal on the planet. 

    The individual is not the same tomorrow. Tomorrow his thought process might change something in his belief dictionary which does not warrant his stay with the present group. This does not stop any other individual with the thought process of this group join this as on date. However, ......... Well, you are spoiling the joy of anarchy. No, I am stressing anarchy in its purest form. You cannot tell that anarchy has to follow rules. If you follow that you will end up with another America. If we follow pure anarchy will we end up as our pre-historic society? Is that good? Is that the best? Will that save this planet from extinction? 

 

Thursday, January 21, 2021

My rants on the sars-cov-2 pandemic

Disclaimer: The words below are "my" rants. I am not a Doctor, chemist or a  Biologist. I am an Engineer. So, there may be mistakes. Do your homework like I have done mine. I dont vouch for authenticity of the matter in the links provided.

     Plenty has been written about the birth and spread of Covid 19. Plenty more than any other pandemic the earth has ever seen. There are already books on the origins and the spread of the virus. They also speak of the spineless governments of the world. The pandemic has had its share of false news and conspiracy theories ranging from 

1. The virus was already existing 

2. It is the same as the normal cold virus 

3. Pharma companies along with the governments have blown it out of proportion

4. Pharma companies wanted to move the people away from usual way of administering medicines to RNA/DNA medicines 

5. Some other businessmen wanted to reduce the population of the world 

6. Pharma industry was not getting enough grants from the governments of the world to shift medicines to RNA/DNA based and ....... 

https://www.livescience.com/common-cold-coronaviruses-t-cells-covid-19-immunity.html 

    The above link tries to explain why the sars-cov-2 virus does not impact certain people. It also talks about our immune system and how it gets trained by one variant of a similar virus and can produce the necessary actions required to nullify the effects of the virus. So, what about a human who has not contacted any related virus. Well, as per the link, that particular person is at risk. If that is so, Americans normally had a vaccine every year for the influenza virus and yet they are one of the most affected countries in terms of percentage of death and infections. First thing is the influenza and the covid virus are of a different class. The antibodies developed for the influenza virus will not(may not) help in fighting the covid 19 variant. 

https://www.britannica.com/story/what-is-the-difference-between-influenza-and-covid-19u 

There, lets us stop the discussion regarding the similarities between them. What about the class of corona virus, were they already existing? Yes. As per the link below 

https://www.healthline.com/health/coronavirus-types

https://www.nationalgeographic.com/science/2021/01/covid-19-will-likely-be-with-us-forever-heres-how-well-live-with-it/

     There have been two well known and documented class of "corona" virus. When we talk about corona virus, we are talking about a class of virus, with a spiked protein cover around the viral payload. These two instances have been contained by isolation and quarantine. These were not spread by asymptomatic humans. If we already know about the corona virus and we contained the previous two, how did we end up in a global pandemic. 

    This can be attributed to the carelessness of the governments of the world. The governments governed by the corporations decided that the aviation industry cannot be stopped. They decided that, the best way to cover this up is to remain silent. May be in many other cases, it might have worked. However, it did not work out in this case. When all the nationalist/jingoist mindsets have been satisfied, the news was allowed into the open. 

    By now SARS-CoV-2, the virus which causes covid 19 was taken everywhere across the globe. The main attribute for this wide spread is that the asymptomatic people were the major spreaders. This aspect of this variant, is what makes it stand apart in the corona series. The damage by the viral load are very similar and attack the respiratory system, the most, with other aspects being discovered as we move ahead in time. If the virus spread was isolated at origin, like the previous two cases, we could have stopped the spread and this blog post wouldn't have existed. 

    Time is a *^%^h. This would be one more instance of a corona virus isolated in a particular geographic place and affect a few 100 people. It is very difficult to gauge the importance of an individual in this business minded planet. It is like this planet has been outsourced and business has to run at any cost, even if the last human is erased. It is like the next batch of humans are toiling somewhere else in a similar manner and all the business will shift to the next planet after the end of the last human on this planet. 

    The lockdowns, or worldwide isolation and quarantine appeared like an eye wash and half hearted, last resort plan. People were moving and the virus was already taken to all the countries across the globe. This isolation and quarantine works only if applied on a scale taken up on the previous known variants of the corona virus. Lockdowns are "face savers" for the politicians and the businessmen. There is no scientific/economical backing for a global lockdown except a political/business perspective. 

    Now, let us come to the treatment. I dont know why the medical companies gave up on treatment and focused only on a vaccine. I dont know the logic/economical aspect of this decision and we dont have a treatment as of date. But, vaccines have been cleared and have been administered to lakhs based on studies on thousands in a very short time. Majority of the vaccines are like proof of concept and highly advanced science of gene editing and precise chemistry of RNA. Reading about the RNA/DNA vaccines, is like reading a fantasy book. It reads like science fiction. If we can do this much for producing a vaccine, how difficult is to use the same technology to do something bad. Dont get me started by denying this. We are not far away, wherein, DNA/RNA jabs with blueprints of all the known viruses will be injected into the human body. It is like an attack dictionary on Missile warning systems. The approach for these vaccines is to generate antibodies for the spike protein. Now, this approach can fail once there is a change in this, in a drastic way. Yes the virus can mutate in many ways. What if, the spike mutates?

    The medical industry took this route by telling that the traditional way of making a vaccine by killing the virus and then injecting this into the human body is time consuming. This is totally %#^*^t. We already have vaccines made from this method and also cleared for use. The major advantage with this approach is we are giving a hint to our immune system about nearly all the properties of this virus. So, this would generate antibodies for many of the chemical combinations present in the virus. 

    The RNA/DNA methodology of making medicines is a great method for big pharma for getting a tight grip on the medicines. This will nearly kill the generics industry. Two recently cleared DNA/RNA vaccines make a statement that the DNA/RNA in the human cells are not touched. Can a normal human, know whether this is true? If DNA/RNA is the methodology of administering medicines, then, governments need to wakeup and ensure that enough competition is fostered and all the developments are available in public domain. It is not wrong, even if the governments start investing in state owned research facilities and upgrade them to the same capabilities as big pharma. In this way we can ensure that there is a lot of testing and availability of these advances are available to the common man. 

    The most interesting take from this pandemic is the polarization of people across the world. The main reason is that big pharma is not good at explaining the cause and the effect. It is like explaining light to the last animal in evolution which had not felt light around it. Our belief systems, our blind beliefs, our limited education, our limited brain usage, our limitation as a human being, has showcased beautifully. It is very interesting to listen to all the conclusions and the reason for these conclusions regarding the pandemic. No two individuals in the same home share the same idea about the pandemic. Many people are convinced that Europeans and Americans are dying of Covid 19 because their immune system is not as strong as their Asian counterpart. This class is forgetting that it originated in Asia and the highest number of deaths happened in Asia. This would have made Russel peters so angry that he would have to change the portion of his standup comedy where he talks about an instance of him landing at Mumbai Airport for the first time and welcomed with smell of shit. 

    We have politicians feeling for the dead, at the least. No corporation has stopped working or repented for any death of their workers. The politicians feel for the dead but are not ready to consider universal healthcare as an option. What is the use of feeling for the dead, when you did not feel for the living? This is the same in all businesses. The plentiful Human resource at its disposal make the business not at all concerned about the people dead with a known reason. People die every minute for a plenty of reasons, but when they die for a reason which the whole world knows may happen is what makes the death more sick. In fact majority of the work available in the world is broken to such an extent that you just have to plugin a new human to do that job. This is what is making the corporations not to take any serious thought towards the pandemic. 

    The medical profession is also at its most liberal best. Any complication can be labelled a "covid 19" case. Stop, dont draw your daggers, this statement was for medical practitioners who have done it or on planning to do it. How am I making this statement so confidently. Well, nobody is allowed to see or touch the patient. He is packed completely and burnt without any second opinion. So, what I am telling is it is very much possible, has been done and can be done. 

    There is one more issue regarding non believers. They are so pissed off by the care taken by the people who believe that there is a virus. Like the non believers who throw the caution to the wind, there is a population who believe that yes, we have a pandemic at hand. Of course there is another population which is exactly in between. They wear their mask below the chin. Never was their hands. These people will wear the mask when they hear some bad news regarding people whom they knew. It will be momentary, maybe for a few days. These people are not bothered about the complete believers or complete non-believers. The problem is with the non-believers. They will make fun of the middlemen and the complete believers alike. The believers will not make fun of the non-believers but are worried that this group will get them affected. They believers are angry on the other two groups. 

    The reason for the hue and cry created by the spread of sars-cov-2 is that, the human body might not detect it as a virus and fight it with enough fervor similar to a virus database it maintains. As time passed we got to know that a major portion of humanity had this virus in their immune database. However, one more issue which caused such widespread attention and lockdown is the fact that asymptomatic people were spreading it. And the virus once in the air, lived a very long time. All this information led to the situation we are today. 

    The good news is that, contrary to initial belief, the human body did fight the virus and many people did develop immunity. Now, the vaccines are here to help people with lesser immunity by adding the info of this virus into their database. This is the reason, I am of the opinion that recipients of the vaccine should be checked for antibodies and the situation of the immune system for this virus before vaccinating them. If they have already developed sufficient amount of immunity, it is of no use to vaccinate them. And we dont know what would be the result of such an action. But, nowhere this is being tested. In fact, every person to be vaccinated should be checked thoroughly for his medical history and compare it with the side effects of the vaccine. Based on satisfactory study and heuristics, the person should be suggested for vaccination. 

 

    Proteins are made of amino acids. And the "some" amino acids on the spike of sars-cov-2 virus are similar to the ones found on the placenta. In fact "some" of these amino acids can be found in other proteins in the human body. A vaccine based on this protein might induce antibodies against the protein with "some" similar amino acids. There is no proof for this. Hence there is no proof to stat that a similarly designed vaccine will induce antibodies attacking the placenta and in turn render woman infertile. There is no proof for this. 

    The human genome is made of DNA. The mRNA vaccine is not supposed to enter the nucleous of the cell. The DNA based vaccines which put the DNA of the spike protein into the cell are not supposed to interfere with the Human DNA. The chances of the vaccine altering the DNA is nearly nil. We dont know what will be the result of that small chance and we dont have any proof if it might happen at all. 

     Whatever be the truth, The wearing of re-usable masks have man advantages. During your commute you are going to filter out at least some of the dust. It will protect your face from the cold breeze. And of course, you are going to be protected from other viruses floating in the air. The other aspect we are practicing is what is difficult to maintain and that is physical distancing. But it is also has many advantages. This will avoid crowded meetings and only the required personnel will be called. This will require plenty of advance planning and to the point discussions. And please kindly use re-usable masks. The planet is already strained to the max with the plastic piling up. 

Sunday, January 17, 2021

Media player daemon: Playing music with mpd and mpc

My love for the Media player daemon is clear if you have gone through my other blog posts. I like its concept. It is simple, straightforward and does what it is supposed to do. Play music. The combination of mpd and mpc is awesome. It is akin to watching a good buddy movie. They are just so perfect together. If you are a person who would like to "see" the song list and control the music by visual controls, you are also covered. There are a plethora of clients for the mpd. In terms of simplicity an curtness, there is nothing closer to mpc. 

 This post is about the barest minimum required to start playing music without the screen filling up with the file names. Installing mpd on arch is as simple as a, b, c.... really. 

pacman -S mpc mpd 

copy /etc/mpd.conf to .config/mpd/mpd.conf Overwrite the file with the information below 

--------------------------------

# Recommended location for database 

db_file "~/.config/mpd/database" 

# Logs to systemd journal 

log_file "syslog" 

# The music directory is by default the XDG directory, uncomment to amend and choose a different directory 

# I like to symlink all my sources of music to the default Music folder. Ultimately, tell the directory where # your media is stored. 

music_directory "~/Music/music" 

# Uncomment to refresh the database whenever files in the music_directory are changed 

#auto_update "yes" 

#These are my choices for the requisite files. Al these files are required. So, if you would like to change the locations, do so. But ensure that these directories are user accessible with write permissions. 

playlist_directory "~/.config/mpd/playlists" 

pid_file "~/.config/mpd/pid" 

state_file "~/.config/mpd/state" 

sticker_file "~/.config/mpd/sticker.sql" 

#This is if you are using pulse audio. If you are using also, change accordingly audio_output { 

type "pulse" 

name "pulse audio" 

} 

----------------------------

Save the file. reboot 

Now, the first step ensure that mpd is running.

mpd 

On success, the above command will not spit out anything. Now, the daemon is running and waiting to server you music. Let us now, build a database of songs available in our directory we specified in mpd.conf. 

Now we have to populate our database. Before doing this step, I suggest you to check whether your music has good metadata related to track names, albums, etc. If not, it is always good to invest some time in editing the id3 tags of your music. This will help us in getting "that" song to play. 

Once you are sure of your metadata. Go ahead and build the database. 

mpc update 

The above command will take some time. Give it a few minutes. To know whether all the songs have been added to the database run the command below. If you see that the last song is the same when you run the command below, multiple times, then you know that the database is completely built. 

mpc listall 

Of course, your database is going to be huge. And depending on your mood, you would like to pick and choose. Let us now create a playlist based on certain criteria. You are now in that retro dance mood and would like to listen to the evergreen Jackson. There are multiple ways to search for Jackson songs in your database based on how your id3 tags are created. If you would like to add all albums with the name Jackson in your album name then you would do 

mpc searchadd album jackson 

I know, Now you want to see what is the playlist which is create by the above command, For this you would 

mpc playlist 

Now, you remembered that there are certain files with Jackson in their names but are not part of an album with jackson in them. Then to add all the songs with title containing jackson 

mpc searchadd title jackson 

Now, check your playlist again 

mpc playlist 

The nerd in you is glowing. You now have all the titles you want to play in your playlist. Hit it. 

mpc play 

Of course, you have got used to seeking music with other command line players by hitting the arrow keys. However, the command for seeking in mpc is(Again, you can map keys and what not.....) 

mpc seek +00:04:00 

The above command is for seeking the song by 04 minutes. I think the logic is clear. This works both for individual files or if you have a file with multiple songs. If you have individual songs in files then 

mpc seek +80% 

would be better. 

 In the middle of your listening pleasure, you would like to know the details of the song being played now

 mpc status  

will give you information regarding the present song and plenty other data related to the present playlist.

For seeking back change the + sign to -. An alias for all the above would be best. 

The post is not complete without gratitude to all the devs and users who make all this possible. The GNU/Linux land and the BSD universe have not stopped surprising me.

 

 PS: Just, one more thing.

 mpc searchplay title jackson

 which will create the playlist and start playing.

Sunday, January 3, 2021

GPG: Encryption and digital signature for the masses Part II

Disclaimer: This is a very serious topic. The observations made here are for a starter. Kindly refer to the man pages and other text books which specialize in guiding for advanced and high stake uses. I am not responsible for any unwanted results by following the notes below. Understand the seriousness of the job on hand and read enough.

 So what is stopping you from creating a key with 

name: Joe biden
email: president@america.gov

Nothing. But you are not going to go a long way with this. The thing is, gpg is not your answer to everything. It is just a tool to sign documents and encrypt the documents. The authenticity of the person sending you the document is still to be checked by going out in the open or from other trusted sources on the public network.

Trust and untrust a key

We have already learnt how to trust your friends public key and record that trust in your keyring. Let us now assume that you want to share the public key of your friend with another of your friends. Now, you extract public key of your friend from your public keyring and save it in an armored format file. Now, if you open the file created for viewing, you can observe that the file also contains your public key also!! How did it land there. It landed there when you "trusted" your friends key. You can forward this file to your another friend who wants the public key of your first friend. The presence of your public key in the file is like you are confirming that the person whose key it belongs is someone you know. This is all good. This is how a "web of trust" is built up. However, this is a two edged sword. When you share the file in question to your second friend. You are also hinting to your second friend that you are "communicating" with that person. This is something that privacy purists will oppose. So, choose wisely. If possible remove your public key from the file your created to share with your second friend.

Let us assume we signed a public key signed@dd.com

Now, we have arrived at some information doubting the key above. So, we have to remove the "trust" we endowed on the above key. Let us remove our signature on the above key

gpg --edit-key signed@dd.com

on the gpg prompt

revsig

go though the queries and revoke the signature.

end the prompt by typing

save

at the prompt

Now, your signature is not on the public key signed@dd.com
If the original public key signed by you is on any key servers, now is the time to push the updated key without your signature on it.

PGP/GPG/OpenPGP


When we talk about asymmetric encryption we come across three abbreviations PGP, OpenPGP and GnuPG(GPG)

PGP is a commercial offering. OpenPGP is an open standard which anybody can implement in code. One such OpenPGP implementation in actual code is GnuPG(GPG). GPG is "free as in freedom" software and is the one to be used by the general public. GPG is licensed under copyleft GNU GPL. So any commercial usage in a tinned product should ensure that the GPL is complied with. For the general public, it is as easy as using GNU/Linux operating systems.

Safeguarding your keys


The key pairs have different exposure levels. The public key has to be made as much "public" as possible and the private key should be kept as private as possible. The "privateness" for your revocation certificate is the same as the private key. Ensure the safe upkeep of these two keys. Guard it upto your life and just below it.

Print your private key and your revocation certificate on good quality paper, store it on storage device, store it on a cdrom and lock it up in a bank safe locker. That is the amount of care you should take care of these two aspects of GPG. If you want to take it with you, ensure that they are encrypted on your storage device and better if the entire device is having file system which is completely encrypted. So, you get two levels of encryption.

Information in your keys


The next thing is the creation of your key pairs. Should you use your "real" name as in "your" name? Should you use your "real" email id? Should the keys expire? If so, what is the optimum expiry age? Should we enter any comment?
These questions have subjective answers. As per the answers for the questions on the public network, the most answers ask users to provide their "real" information. 

This helps in getting you into the "web of trust" which is like the phone book of GPG users. I would suggest, again, a suggestion only, that you should use your real information to bring credibility to your public key. So, yes use your "real" name, "real" email id and also a comment which would make you stand out if your name is more generic. As for the expiry of keys, it is recommended by many experts that you should be expiring your keys at "regular" intervals. Doing so have many advantages. Easy revocation since after the expiry it is of no use to anybody. Keeps your public key ahead of technical obsolescence. 

Dont forget that you can add an image to the created key. This can be your real photograph or any image left for you imagination. Just be careful about whatever decision you take.

More on keys

The last 08 digits of the fingerprint is also called the keyid.
The email id and the name information will be the userid or the UID.

When you want to specify a specific key on the gpg command line, you can use the UID or the keyid.

If you use

gpg --list-keys friend@friendship.com    or
gpg --list-keys A2E43218 ( If using the keyid of the key )

it does not print the fingerprint.

To print the fingerprint of a key

gpg --fingerprint friend@friendship.com


A public key could have been signed previously by other gpg users. On import of a new public key, you can check out all the signatures on the public key by

gpg --list-sigs friend@friendship.com

Keyservers

If you are using keyservers then

1. If you signed a friend's public key after downloading from the keyserver, then you can update the friend's public key with a copy of which you signed.

gpg --send-keys friend.friendship.com --keyserver subkeys.pgp.net(Enter the address of your key server here)

2. To receive a key from the keyserver

gpg --recv-keys friend.friendship.com(Here as usual, you can use the keyid)

3. Keep your keyring updated with any updates to the keys which you have downloaded from the keyserver. There would be changes to the public keys you downloaded a long ago from the keyserver, in terms of UIDs, email ids, the number of signatures on a particular public key

gpg --refresh-keys --keyserver subkeys.pgp.net

Privacy & Anonymity

Though, gpg keeps the information you want to share as private, it does not make you anonymous. But it can "help" you if you are serious on anonymity and you belong to the press. When you send encrypted information through regular public network channels like email, it is still possible to know who has sent the encrypted information, without knowing what is in the encrypted information. 

The public key is advertised publicly. It is trivial to find out the owner of a public key. If you dont want to share the public key with others, then how do you send personalized and encrypted information? One possible way is to encrypt your public key with the public key of the specific recipient. Send that encrypted key to the recipient, who in turn can get your public key by decrypting with his private key. The Tor network can be used for sending gpg encrypted information including the gpg encrypted public key.


Wednesday, December 30, 2020

GPG: Encryption and digital signature for the masses

Disclaimer: This is a very serious topic. The observations made here are for a starter. Kindly refer to the man pages and other text books which specialize in guiding for advanced and high stake uses. I am not responsible for any unwanted results by following the notes below. Understand the seriousness of the job on hand and read enough. 

     The notes below are culled from the public network from various sources. Thanks to the free software foundation for the fantastic gpg tool and all the original authors of the pgp standard. GPG is really "encryption" for the masses. Kindly refer to directions from master users for creation and usage of GPG. The recommended way of creating a key pair is on a computer with

1. The operating system to be installed with images downloaded and checked for the integrity of the OS image on another computer connected to the internet.
2. Install the downloaded operating system on new vanilla hardware and the computer should not be connected to the internet even while installing the OS.
3. After installing the OS generate the keypair ensuring that the computer is in now way connected to the public network.

Even if you dont want to create the keys in the way mentioned above. It is required to know the above information.

--------------------------------

    Private key cryptography and symmetric cryptography are the same phrases. They are just a complicated way of telling that the cipher and key used for encrypting a message is the same that has to be used to decrypt the message. That is, the cipher and the key is first shipped to the recipient. Then the actual encrypted message is sent.

Public key cryptography/asymmetric cryptography:

    A mathematical process generates a pair of keys. A message encrypted by one key of this pair, can be decrypted by the other key of this pair. One key is called the public key(can be shared with the whole world) and the other is called the private key or the secret key(Not to be shared with "anybody").

How asymmetric cryptography works:

 
    Let us assume the data of individuals in the whole world is maintained in a database with their respective public key. So we pickup the name and the corresponding public key on this database(provided we know this is the person whom we want to communicate). Now

1. we create a message which is to be sent to "only" this individual.
2. we encrypt this message with the public key available in the database.
3. send the message to the individual through the public network, by means like email ....
4. The recipient will then decrypt this message with his private key
5. No individual in the world will be able to decrypt this since the message can be decrypted with its pair which was generated by the mathematical process which produced the public/private key pair

-------------------------------

Creating and managing gpg keypairs

Let us now get down to "actually" creating the key pairs. We will be using GPG(GNU Privacy Guard). Kindly refer to the man pages for further information and the public network for deeper insights. GPG is a common on all the *nix operating systems and is available for the proprietary operating systems also.


The first step is to generate a key pair. Run the following command

gpg --full-generate-key

On running the above command in a terminal you will be asked the following queries. Answer accordingly.

a. Choose the type of key: We will choose the default RSA
b. choose the bits for your key: Let us choose the longest option(We are in modern times)
c. Expiry date: I would go for an yearly update
d. Real name: Here you have an option of putting your real name(You can ofcourse not tell your real name. But, to use it in place like github etc, it is better to have your real name)
e. Email address: The same logic as above is applicable here also
f. There is a comment field: You may fill it up or recommended by many people to leave it empty

After the above step gpg asks to enter your passphrase. 

This is a very "important" step. The passphrase is intentionally called a "phrase" it is not called a password. This has to be as long as possible. It is better if it has a mixture of alphanumeric characters interspersed with special characters like @%(%$) etc. It has to be sufficiently long. This is what protects your private key. Please use a long phrase, which you can remember very easily and quickly. In fact you should be flamboyant when your are typing out your phrase. At the same time that phrase should be alien to anybody else on the planet.

Once you enter the passphrase, gpg starts the mathematical part required to generate the key pairs. Help out with sufficient entropy(randomness) by opening lot of firefox tabs, plenty of word processors and go ahead and do whatever work you want to do with your computer. This improves the entropy required to ensure the randomness of the digits generated for your key.

Once you generate the keys, the keys are stored in what is called a "keyring" Just know that the keys are safe in a box and locked by your passphrase

To print out the public key which was generated

gpg --list-key

To get the public key in a format which is accepted worldwide

gpg --export --armor dfdf@fdfd.com > dfdf_pubkey.asc

To display your public key
 

cat dfdf_pubkey.asc

Once this is generated, you can share it with the world. If your friend wants to add your public key to his keyring, then he would

gpg --import dfdf_pubkey.asc

There, now he has your public key in his keyring.


To list the private keys

gpg --list-secret-keys   

Now it is required to generate a revocation certificate. Why are we in such a hurry in creating one. Well, we should have the revocation certificate handy, if the keys have been compromised and you think that the keys can be used by others to gain access or sign documents with your keys and send it to inappropriate places. With revocation certificate you can revoke the key pairs and also tell the whole world about it so that the whole world knows that there is no relationship with your previous sets of keys. The latest version of gpg creates a revocation certificate during the key pair creation process itself, fantastic.

gpg --gen-revoke fdfd@dfdf.com > fdfd_revoke.asc

Now you will be asked for the reason. Choose the appropriate reason.

The file you created is called the ASCII armor file.

So, we have created the revocation certificate. This certificate will be used to revoke our key pairs.

gpg --import revoke.asc

Now if you run

gpg --list-key

You will get your public key information with "revoked" added

Now you can really delete your key pairs

gpg --delete-secret-keys fdfd@dfdf.com


gpg --delete-keys fdfd@dfdf.com

Now if your list your keys

gpg --list-key

The output will be empty

Let us now remove the revocation certificate also

rm fdfd_revoke.asc

-------------------------------
 

Encryption


Let us now encrypt and share some secret documents with friends on the public network

To start with you should have

1. Got the public key of your friend.
2. Import the public key into your keyring.
3. Did your homework to ensure that the public key does indeed belong to your friend.

We have done the homework and are sure thatthe public key shared by your friend is genuine. Let us now go ahead and trust the public key by signing your friends public key with your private key

gpg --sign-key friend@friendship.com

Now, to encrypt the document and ensure that the only recipient who can decrypt the document is your friend,

gpg --encrypt -r friend@friendship.com secret_document.txt

The command will output secret_document.txt.gpg which is a binary file

If you prefer the ascii armor format

gpg --encrypt --armor -r friend@friendship.com secret_document.txt

which would output secret_document.txt.asc again a binary file.

You can now send this document through any channel available on the public network and are assured that your friend with whose public key the file was encrypted can only decrypt it with his private key. From now on, if you, the author have deleted the original secret_document.txt also cannot decrypt the resultant file secret_document.txt.gpg.

To avoid this you can add yourself also as a recipient

gpg --encrypt -r friend@friendship.com -r fdfd@dfdf.com

Now, you the author with email id fdfd@dfdf.com can also decrypt the file as and when required and can safely now delete the original file

-------------------------------


Digital signature


We have all the way been talking about encrypting a document. We want to ensure that the document reaches and is ready only by the individual(s) to which it was intended. This is fine. Let us forget encryption for a moment and think of a public document. Anyone reading a public document should be ensured that this particular document is an un-altered copy authored by a particular person. The document should be able to speak about the author. That is, the document should be signed by the original author. This ensures the reader that the document is an un-altered document and is as was imagined by the author. We are talking a synonymous situation of physically signing a document. We are talking about an electronically signed document.

gpg allows us to do this. When we are signing a file we are not encrypting the file, we are just creating a binary file with contents of the signed file as well as information about our signature. The signing and verifying methodology described below makes use of the fact that the signed file has the contents of the signed file as well as the signature in one single file.

 When gpg signs a document there are two things which are ensured

1. Integrity: When the recipient checks for the signature authenticity and it matches, it also means that the signed document received is not altered in any manner

2. Authentication: Again, when the recipient checks for the signature authenticity and it matches, it also means that the document is indeed from the person who really sent the message by signing with his private key

gpg --sign document.txt

This will create document.txt.gpg, a binary file which includes the content of document.txt and the signature.

Before creating the .gpg file, you will be asked to enter the passphrase, Now, you have affixed your signature on the document. This process makes use of your private key. So, as per the pgp convention, if you encrypt with one part of the key pair, the other key pair is used to decrypt the document. Now, since you have added your signature to the document with your private key, the confirmation of ownership can be done with your public key. Since your public key is supposed to be public, anybody, with access to your public key will be able to ensure that document is created by you. However, the world can view the document by using gpg --decrypt as discussed below and view it but not ensure that the document was really signed by you and you are the creator of the document 

Now, on receipt of the file, the recipient to start with, will first check for the authenticity of the signature. This is done by

gpg --verify document.txt.gpg

The output will show the signature and will term the signature as good, if you have the public key of the sender in your keyring. So we now have attested that the file infact, is created by the creator we were expecting.

Now to proceed to view the contents of the document, let us decrypt it, ie, let us bring it back to viewable state.

gpg --decrypt document.txt.gpg >> document.txt

The above step will still re-create the original file though the authors public key is not present in the keyring. gpg will just tell that the signature cannot be verified.

I think you are used to seeing signed documents with an armor ascii format. To achieve this

gpg --sign --armor document.txt

This will generate document.txt.asc, a binary file which includes the signature in armor ascii format with the contents of the file

To verify the file and as well as decrypt

gpg --verify document.txt.asc >> document.txt

Once you trust the public key and are sure that the public key indeed belongs to the individual you know, that trust can be extended into your keyring by signing the author's public key with your private key. This can be checked in various ways. If we know the author and his online activities, we could go to the place he is most active and check for his email credentials with his pgp fingerprint on that website. Or we could go to the many pgp key servers over the public network and search for the fingerprint or the email id in the fingerprint. It should match with the copy of the public key we have. Once you are content that this is the person associated with the key, then and only then change his public key in your keyring to trusted. This will remove some warnings when you check the signature of the files from the author which talks about "...Not certified with a trusted signature...". To do that

gpg --sign-key author@creator.com

After this when you verify the signed files received from the author by

gpg --verify document.txt.gpg


you will not find any warnings

Down the line, by some means you start doubting the public key and the associated individual it is time to revoke the "trusted key" status in your keyring. Now the thing is once you create add a key in the keyring, any further edits are possible only from within the gpg command. Here we are interested in removing the trust from the public key. So you would start the gpg editor like

gpg --edit-key author@creator.com


Now you will get the gpg> prompt
Enter "help" to get all the options. Here we are interested in revoking the trust we put in the above public key
type revsig at the gpg prompt
You will be prompted for the reason, answer accordingly. Exit and save when prompted. Now, you have successfully removed/revoked the "trusted" badge from author@creator.com
 

----------------------------------

Digital signature for special case involving pure text files

 
If you are dealing only with text files. It will better if the text and the sign appear in the same file as a regular document. It is like you have a text document and you affix your signature to the end of the document. gpg provides this facility through

gpg --clearsign document.txt

will create a document.txt.asc

Now the recipient can open the file with

cat document.txt.asc

which will have the content of the document as well as the signature at the end of the document. Now, to verify the signature, the recipient would

gpg --verify document.txt.asc


Now, to get back the original document only, without the signature then the recipient would

gpg --decrypt document.txt.asc > document.txt

--------------------------------

Digital signatures for huge binary files

 
All this time we have been using gpg such that the contents of the signed file and the signature are available in the output file of the gpg command. This might not be conducive as the file sizes grow. It is better off to have the signature separate from the signed file. With this, the file and the signature are two different files. Just remember that to check the signature with the associated file both have to be in the same directory and the file names cannot be changed.

To create a signature separate from the signed document

gpg --detach-sign --armor document.txt


This will output a file document.txt.asc. (You still have your original document.txt unchanged). This file contains only the signature but is associated with the original file document.txt. This is the methodology used to share binary files and packages on the public network. You will have the package/software you would like to download and adjacent to that you will have

1. The signature (normally it will be labelled the pgp file)
2. The public key of the author

You download the above two along with the software package

1. Put all the three files in a single directory
2. Import the public key of the author
3. Sign the public key of the author with your private key after doing your homework about the authenticity of the public key
4. check the signature
5. On no warnings proceed with the installation of the package