### Is there an existing issue for this?

- [X] I have searched the existing issues

### Feature description

Currently, we always [calculate](https://github.com/localstack/localstack/blob/256b0de1f1a6085d3994e8d1322c763962ded2f0/localstack/services/kms/models.py#L229-L230) SHA256 digests for messages with `RAW` [MessageType](https://docs.aws.amazon.com/kms/latest/APIReference/API_Sign.html#API_Sign_RequestSyntax).

It is not clear if this is compatible with AWS. There are some reports like [this one](https://github.com/localstack/localstack/issues/6815#issuecomment-1309882776) about our implementation of Sign / Verify not working properly. Could be due to these digests.

What has to be done:
1. Should try to figure out how AWS calculates digests, whether the same algorithm is always used, or if digests are based on [SigningAlgorithm](https://docs.aws.amazon.com/kms/latest/APIReference/API_Sign.html#API_Sign_RequestSyntax). For this we can try importing the same key material into both AWS and LocalStack, use the resulting keys to sign the same message and then compare the signatures. If that works. If not - we can try just creating a key in AWS, sign a message with AWS, export the public key and then go through different digest algorithms in LocalStack, trying to verify the signed message with the obtained public key.
2. If the issue is really in our implementation of digests - should fix the digest logic.

### 🧑‍💻 Implementation

_No response_

### Anything else?

_No response_
import datetime
import io
import json
import logging
import os
import re
import struct
import uuid
from collections import namedtuple
from dataclasses import dataclass
from hashlib import sha256
from typing import Dict, List
from cryptography.exceptions import InvalidSignature
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives import serialization as crypto_serialization
from cryptography.hazmat.primitives.asymmetric import ec, padding, rsa
from localstack.aws.accounts import get_aws_account_id
from localstack.aws.api import CommonServiceException
from localstack.aws.api.kms import (
    CreateAliasRequest,
    CreateGrantRequest,
    CreateKeyRequest,
    DisabledException,
    EncryptionContextType,