## Bitcoin wallet key pair change and transaction validation

Some things you need to remember about bitcoin:

• Bitcoin is cash, not a bank account. These are very different models.
• You pay by handing over digital coins, not by making a bank-transfer between accounts.
• No one but you cares what total amount of Bitcoin money you have, they don’t need to know.

This fundamental misunderstanding comes up a lot in different forms. The questions below have answers which touch on this and may help form a clearer understanding:

For anonymity reasons key pair of a wallet can change.

HD wallets generate an extra key pair for each transaction but the old key-pairs are still valid and are not changed.

Then how does miner validate if a sender has enough bitcoins?

Miners don’t care how much money is in a wallet. Bitcoin is cash and like other forms of cash, people don’t care how much money you have, they only care that the cash you give them is enough and is genuine and not a forgery.

Is this has something to do with origin of bitcoin sent in transaction?

What you spend as inputs to a new transaction are the outputs of a previous transaction in which you received money. These are unspent transaction outputs (UTXOs).

what if sent sum is 30 BTC, but they are all received from 3 (3×10 BTC) separate wallets?

People don’t care. Your transaction could have hundreds of inputs and hundreds of outputs – though that makes the fee higher. All that matters to the recipient and everyone else is that the cash is genuine. In Bitcoin this means UTXOs and that you provide proof of right to spend (you supply a mathematically derived number that satisfies the spending script of the UTXO)

## How do you generate an .asc file from a RSA 3072-bit asymmetric key pair

I have generated a RSA key but the client requires it in ASC format. Does this mean i have to use pgp tool to first generate the rsa key if not how can i get my rsa key in that format.

## transactions – What does bitcoin do that prevents someone from using your coins by just generating a key pair and saying “you” sent those coins?

I think I’m missing and understanding about the current process of how your wallet works and how the transactions are signed.

For example, if I’m user “A” and there exists a transaction from user “B” where I received 10 BTC that has been written into a block. Then for me to use it I just generate a random public/private key pair and sign the transaction with the private key.

What is stopping user “B” from generating a public/private key pair then creating and signing a transaction saying that I, user “A” sent them 10 BTC?

I’ve read that some wallet implementations generate a list of public/private key pairs that can somehow be associated with the wallet address? I’m not sure how this would come into play if this is the case or if I’m misunderstanding this bit of information.

## How to best select a texture pair to use in height blending when using a splatmap shader

In my project, I’m implementing a shader to combine up to 4 textures in a terrain using a splatmap texture (https://en.wikipedia.org/wiki/Texture_splatting).

I want to combine the splatmap blending with the height blending technique, described in: http://untitledgam.es/2017/01/height-blending-shader/. This technique basically defines a function to interpolate between two textures more realistically based on height information.

The problem is, in order to use height blending, I need to know which pair of textures I’ll be interpolating, while in the splatmap I actually have four different texture sets (channels, R G B and A).

So what I want to achieve is a shader that will select the pair of textures for which the splatmap channel information is strongest, and interpolate between the two while discarding others. My “naïve” attempt was something along the lines of (simplified version, pseudo-code and only for illustrative purposes):

``````uniform sampler2D tex1;
uniform sampler2D tex2;
uniform sampler2D splat;

sampler2D sampler;
if (splat.r > splat.g) {
sampler = tex1;
} else {
sampler = tex2;
}
}
``````

The problem, I realized, is that I can’t store samplers inside a variable like this due to limitations in GLSL. So I’m looking for a soultion that would be similar to this. Particularly, I would want to avoid a solution where I’m sampling all four textures for every texture lookup. That is because I will be using some expensive techniques inside the shader which require several texture lookups, and I don’t want to increase the computation cost 2x.

## machine learning – Reference selection for rating assignment based on pair comparison

Background: a set of 300 images are prepared, randomly pair compared with 60 other images, assigned a rating (from 1-star to 5-star) based on the pair comparison score (+1 if wins a pair comparison and +0 if loses a pair comparison), the score range for the rating assignment is 0-11 for 1-star, 12-23 for 2-star, 24-36 for 3-star, 37-47 for 4-star, and 48-60 for 5-star

Objective: want to rate 1000 more images based on the 300 rated images, again through pair comparison, but with some of the 300 rated images instead of between themselves

Problem:

• what images should be selected from the 300 rated images for the pair comparison, and how many?
• how should the score function be defined for the pair comparison with the selected image?

Could somebody help this experiment design? Thank you very much for you attention and help!

## combinatorics – Streaming maximum pair matching with limited memory

I am trying to find as many pairs of elements as possible from two distinct data streams, while being constrained by the number of elements I can hold in memory at any given time. Once a pair of elements is found, it can be removed from memory.

This problem feels like a streaming variant of the maximum coverage problem, except that I’m trying to figure out the optimal strategy for determining which elements I should keep and which ones I should prune when a new element arrives and my data structure is at its maximum capacity.

More generally, I would like to find which classical problem this can be reduced to.

A more formal phrasing of my question would be : given two streaming multisets of integers $$S_1$$ and $$S_2$$ and a positive integer capacity $$C$$, what is the optimal strategy to find the maximum number of pairs of identical integers from $$S_1$$ and $$S_2$$ such that at any point, the number of integers in memory is less than $$C$$ ?

## key management – How does a Certificate get associated to the private key pair?

I am new to SSL certs and trying to understanding once the certificate is imported into the Certificate Store (in Windows), how does the certificate get associated with the private key pair? Is that by creating a pfx that would contain the certificate and private key and import that pfx into Certificate Store? We intent to use the TPM to store the private key (but not using it to generate the keypair). How do we tell the certificate store where the associated private key is to a certificate?

## generating random pair key has standard?

If a crypto wallet generates all pair key between small range for example between 1-100, the risk and possibility of creating the same key is an increase. Generating random pair keys for cryptocurrency has standard? If the answer is No what the solution cryptocurrency for it?

## key management – How can I store and manage my GPG key pair securely?

I’ve taken measures and thoughts on how to securely store and manage my key pair. In the process of it a few questions arose, which I’m not capable of answering yet. My key pair will be used to encrypt passwords and documents of banks, insurances, invoices, photos and the like. All this data is not publicly available. It is stored in a cloud with password restricted access. I’m evaluating right now, which one fits best.

This is how I set up my key pair:

``````# Generated a key pair in the past, following general tutorials
gpg> list
sec rsa2048/9AB628FC04C23871
created: 2019-02-29 expires: 2022-02-29 usage: SC
trust: ultimate    validity: ultimate
ssb rsa2048/17832C40CF826BA9
created: 2019-02-29 expires: 2022-02-29 usage: E
( ultimate ) (1). Thomas Kelly <Tkelly@ua-corp.com>

> gpg --list-keys --with-fingerprint Tkelly@ua-corp.com
pub    rsa2048 2019-02-29 (SC) (expires: 2022-02-29)
B69A 8371 FC28 402C C204 82CF 7138 A96B B8F4 C87A
uid         ( ultimate ) Thomas Kelly <Tkelly@ua-corp.com>
sub    rsa2048 2019-02-29 (E) (expires: 2022-02-29)

> fdisk /dev/sdb # n, 2048, +2G, w
> cryptsetup open --type plain -d /dev/urandom /dev/sdb1 data
> dd if=/dev/zero of=/dev/mapper/data status=progress bs=1M
> cryptsetup close data
> cryptsetup luksFormat /dev/sdb1 # pw ...
> sudo cryptsetup open /dev/sdb1 data
> mkfs.ext4 /dev/mapper/data
``````

Then I went on and exported my keys towards this device, I’ve created. After I got used to it, that private keys are always a little bit different from another and you can’t export your sub-public key, the following questions remained:

1. Are both of the following commands returning the ssb key (17832C40CF826BA9)?
``````gpg --export-secret-keys 17832C40CF826BA9
gpg --export-secret-subkeys 9AB628FC04C23871
``````
1. Is it fine to remove the key 9AB628FC04C23871 from my system, after I backed it up on the drive, created above?

2. Should I save a revocation certificate with it?

3. This key pair once expired and I changed the expire date. I can’t remember correctly, but I’ve found two additional certificates lying around that seem to be these old expires certificates. I’ve read that the process of changing the expiring value creates new certificates. Can you confirm this?

4. I want to have two certificate stores like this on different locations. I’d renew the key on a yearly base. Should I use paperkey or the same digital method above?