Cyanide
A cyanide is any chemical compound that contains the cyano group (CN), which consists of a carbon atom triple-bonded to a nitrogen atom.  Cyanide specifically is the anion CN-.  Many organic compounds feature cyanide as a functional group; these are called nitriles in IUPAC nomenclature (for example, CH3CN is referred to by the names acetonitrile or ethanenitrile per IUPAC, but occasionally it is labeled using the common name methyl cyanide).  Of the many kinds of cyanide compounds, some are gases, others are solids or liquids. Those that can release the cyanide ion CN- are highly toxic.
The word "cyanide" comes from the Greek word for "blue", in reference to hydrogen cyanide, which was called Blausaure ("blue acid") in German after its preparation by acid treatment of Prussian blue.

# Appearance and odor
Hydrogen cyanide (HCN) is a colorless gas with a faint bitter almond-like odor. Most people can smell hydrogen cyanide; however, due to an apparent genetic trait, some individuals cannot detect the odor of HCN. Sodium cyanide and potassium cyanide are both white powders with a bitter almond-like odor in damp air, due to the presence of hydrogen cyanide formed by hydrolysis:

# Occurrence
Cyanides are produced by certain bacteria, fungi, and algae and are found in a number of foods and plants. Cyanide is found, although in small amounts, in apple seeds, mangoes and almonds. In plants, cyanides are usually bound to sugar molecules in the form of cyanogenic glycosides and serve the plant as defense against herbivores. Cassava roots (aka manioc), an important potato-like food grown in tropical countries (and the base from which tapioca is made), contains cyanogenic glycosides.
The Fe-only and -hydrogenase enzymes contain cyanide ligands at their active sites.  The biosynthesis of cyanide in the -hydrogenases proceeds from carbamoylphosphate, which converts to cysteinyl thiocyanate, the CN- donor. 
Hydrogen cyanide is a product of certain kinds of pyrolysis and consequently it occurs in the exhaust of internal combustion engines, tobacco smoke, and certain plastics, especially those derived from acrylonitrile.

# Coordination chemistry
Cyanide is considered, in a broad sense, to be the most potent ligand for many transition metals.  The very high affinities of metals for cyanide can be attributed to its negative charge, compactness, and ability to engage in -bonding.  Well known complexes include:
- hexacyanides 3 (M = Ti, V, Cr, Mn, Fe, Co), which are octahedral in shape;
- the tetracyanides, 2 (M = Ni, Pd, Pt), which are square planar in their geometry;
- the dicyanides  (M = Cu, Ag, Au), which are linear in geometry.
The deep blue pigment Prussian blue, used in the making of blueprints, is derived from iron cyanide complexes (hence the name cyanide, from cyan, a shade of blue). Prussian blue can produce hydrogen cyanide when exposed to acids.

# Organic synthesis
Because of its high nucleophilicity, cyanide is readily introduced into organic molecules by displacement of a halide group (i.e. the chloride on methyl chloride).  Organic cyanides are generally called nitriles.  Thus, CH3CN can be methyl cyanide but more commonly is referred to as acetonitrile. In organic synthesis, cyanide is used as a C-1 synthon. I.e., it can be used to lengthen a carbon chain by one, while retaining the ability to be functionalized.
- RCN + 2 H2O  RCOOH  +  NH3 (Hydrolysis under reflux with mineral acid catalyst), or
- RCN + 0.5 LiAlH4  + (second step) 2 H2O   RCH2NH2  +  0.5 LiAl(OH)4 (under reflux in dry ether, followed by addition of H2O)
An alternative method for introducing cyanide is via the process of hydrocyanation, whereby hydrogen cyanide and alkenes combine:
RCH=CH2  +  HCN    RCH(CN)CH3
Metal catalysts are required for such reactions.

# Applications
Potassium ferrocyanide is used to achieve a blue colour on cast bronze sculptures during the final finishing stage of the sculpture. On its own, it will produce a very dark shade of blue and is often mixed with other chemicals to achieve the desired tint and hue.  It is applied using a torch and paint brush while wearing the standard safety equipment used for any patina application: rubber gloves, safety glasses, and a respirator. The actual amount of cyanide in the mixture varies according to the recipes used by each foundry.

## Medical uses
The cyanide compound sodium nitroprusside is occasionally used in emergency medical situations to produce a rapid decrease in blood pressure in humans; it is also used as a vasodilator in vascular research. The molecule of Vitamin B12 usually also contains cyanide. During World War I, a copper cyanide compound was briefly used by Japanese physicians for the treatment of tuberculosis and leprosy.

## Mining
Gold and silver cyanides are among the very few soluble forms of these metals, and cyanides are thus used in mining as well as electroplating, metallurgy, jewelry, and photography.  In the so-called cyanide process, finely ground high-grade ore is mixed with the cyanide (concentration of about two kilogram NaCN per tonne); low-grade ores are stacked into heaps and sprayed with cyanide solution (concentration of about one kilogram NaCN per ton). The precious-metal cations are complexed by the cyanide anions to form soluble derivatives, e.g.  and .
Silver is less "noble" than gold and often occurs as the sulfide, in which case redox is not invoked (no O2 is required), instead a displacement reaction occurs:
The "pregnant liquor" containing these ions is separated from the solids, which are discarded to a tailing pond or spent heap, the recoverable gold having been removed.  The metal is recovered from the "pregnant solution" by reduction with zinc dust or by adsorption onto activated carbon. This process can result in environmental and health problems.  Aqueous cyanide is hydrolyzed rapidly, especially in sunlight.  It can mobilize some heavy metals such as mercury if present.  Gold can also be associated with arsenopyrite (FeAsS), which is similar to iron pyrite (fool's gold), wherein half of the sulfur atoms are replaced by arsenic. Au-containing arsenopyrite ores are similarly reactive toward cyanide.

## Fishing
Cyanides are illegally used to capture live fish near coral reefs for the aquarium and seafood markets.  This fishing occurs mainly in the Philippines, Indonesia and the Caribbean to supply the 2 million marine aquarium owners in the world. In this method, a diver uses a large, needleless syringe to squirt a cyanide solution into areas where the fish are hiding, stunning them so that they can be easily gathered. Many fish caught in this fashion die immediately, or in shipping. Those that survive to find their way into pet stores often die from shock, or from massive digestive damage. The high concentrations of cyanide on reefs on which this has occurred has resulted in cases of cyanide poisoning among local fishermen and their families, as well as irreversible damage to the coral reefs themselves and other marine life in the area.
Environmental organizations are critical of the practice, as are some aquarists and aquarium dealers, to prevent the trade of illegally-caught aquarium fish. The Marine Aquarium Council (Headquarters: Honolulu, Hawaii) has created a certification in which the tropical fish are caught legally with nets only.  To ensure authenticity, "MAC-Certified marine organisms bear the MAC-Certified label on the tanks and boxes in which they are kept and shipped." MAC Certification.
Magnesium cyanide is also used in some countries illegally to stun and harvest streamlined fish.

## Fumigation
Cyanides are used as insecticides for the fumigating of ships. In the past cyanide salts have and still are in some places being used as rat poison, and for killing ants.

# Chemical tests for cyanide

### Prussian blue
The formation of Prussian blue can be used as a test for inorganic cyanide, for instance in the sodium fusion test.  Typically, iron(II) sulfate is added to a solution suspected of containing cyanide, such as the filtrate from the sodium fusion test. The resulting mixture is acidified with mineral acid. The formation of Prussian blue is a positive result for cyanide.

### para-benzoquinone in DMSO
A solution of para-benzoquinone in DMSO reacts with cyanide to form  a cyanophenol, which is fluorescent. Illumination with a UV light gives a green/blue glow if the test is positive.

### Copper and an aromatic amine
As used by fumigators to detect hydrogen cyanide, copper(II) salt and an aromatic amine such as benzidine is added to the sample, as an alternative to the benzidine an alternative amine di-(4,4-bis-dimethylaminophenyl) methane can be used. A positive test gives a blue colour.  Copper(I) cyanide is poorly soluble. By sequestering the copper(I) the copper(II) is rendered a stronger oxidant. The copper, in a cyanide facilitated oxidation, converts the amine into a coloured compound. The Nernst equation explains this process. Another good example of such chemistry is the way in which the saturated calomel reference electrode (SCE) works. The copper, in a cyanide facilitated, oxidation converts the amine into a coloured compound.

### Pyridine - Barbituric Acid Colorimetry
A sample containing cyanide is purged with air from a boiling acid solution into a basic absorber solution. The cyanide salt absorbed in the basic solution is buffered at pH 4.5 and then reacted with chlorine to form cyanogen chloride. The cyanogen chloride formed couples pyridine with barbituric acid to form a strongly colored red dye that is proportional to cyanide concentration. This colorimetric method following distillation is the basis for most regulatory methods (for instance EPA 335.4) used to analyze cyanide in water, wastewater, and contaminated soils. Distillation followed by colorimetric methods, however, have been found to be prone to interferences from thiocyanate, nitrate, thiosulfate, sulfite, and sulfide that can result in both positive and negative bias. It has been recommended by the USEPA (MUR March 12, 2007) that samples containing these compounds be analyzed by Gas-Diffusion Flow Injection Analysis - Amperometry.

### Gas Diffusion Flow Injection Analysis - Amperometry
Instead of distilling, the sample is injected into an acidic stream where the HCN formed is passed under a hydrophobic gas diffusion membrane that selectively allows only HCN to pass through. The HCN that passes through the membrane is absorbed into a basic carrier solution that transports the CN to an amperometric detector that accurately measures cyanide concentration with high sensitivity. Sample pretreatment determined by acid reagents, ligands, or preliminary UV irradiation allow cyanide speciation of free cyanide, available cyanide, and total cyanide respectively. These relative simplicity of these flow injection analysis methods limit the interference experienced by the high heat of distillation and also prove to be cost effective since time consuming distillations are not required.

# Toxicity
Many cyanide-containing compounds are highly toxic, but some are not.  Prussian blue, with an approximate formula Fe7(CN)18 is the blue of blue prints and is administered orally as an antidote to poisoning by thallium and Caesium-137. The most dangerous cyanides are hydrogen cyanide (HCN) and salts derived from it, such as potassium cyanide (KCN) and sodium cyanide (NaCN), among others.   Also some compounds readily release HCN or the cyanide ion, such as trimethylsilyl cyanide (CH3)3SiCN upon contact with water and cyanoacrylates upon pyrolysis.
Cyanide is an inhibitor of the enzyme cytochrome c oxidase (also known as aa3) in the fourth complex of the electron transport chain (found in the membrane of the mitochondria of eukaryotic cells.)  It attaches to the iron within this protein.  The binding of cyanide to this cytochrome prevents transport of electrons from cytochrome c oxidase to oxygen. As a result, the electron transport chain is disrupted, meaning that the cell can no longer aerobically produce ATP for energy.  Tissues that mainly depend on aerobic respiration, such as the central nervous system and the heart, are particularly affected.  Antidotes to cyanide poisoning include hydroxocobalamin and sodium nitrite which release the cyanide from the cytochrome system, and rhodanase, which is an enzyme occurring naturally in mammals that combines serum cyanide with thiosulfate, producing comparatively harmless thiocyanate.
Cyanides have been used as a poison many times throughout history. Its most infamous application was the use of hydrogen cyanide by the Nazi regime in Germany for mass murder in some gas chambers during the Holocaust. Cyanide has been used for murder, as in the case of Grigori Rasputin. It has also been used for suicide. Some notable cases are Erwin Rommel, Eva Braun, Wallace Carothers, Hermann Goring, Heinrich Himmler, Alan Turing, Odilo Globocnik, Adolf Hitler (in combination with a gunshot), residents of Jim Jones' the People's Temple in Jonestown and the LTTE (they use it to kill themselves if they are captured by Armed forces).